diff --git a/models/res_company.py b/models/res_company.py
index 74b1685001f190931e6062e06de7228d53a9a6a2..c356d0c3796995d44d523e843b25475b116037a8 100644
--- a/models/res_company.py
+++ b/models/res_company.py
@@ -13,7 +13,7 @@ class ScopCotisationCompany(models.Model):
string='Journal des cotisations',
domain="[('type', '=', 'sale')]"
)
- tag_id = fields.Many2one(
+ tag_cotiz_id = fields.Many2one(
comodel_name='res.partner.category',
string='Etiquette de cotisation',
ondelete='restrict'
diff --git a/models/res_config_settings.py b/models/res_config_settings.py
index ad517e943b111da2be81c5660acb08a1c828811a..55d713f81eacd6b9e6c5051aba845cea2579991f 100644
--- a/models/res_config_settings.py
+++ b/models/res_config_settings.py
@@ -18,9 +18,9 @@ class CotisationsConfigSettings(models.TransientModel):
string='Journal des cotisations',
domain="[('type', '=', 'sale')]")
- tag_id = fields.Many2one(
+ tag_cotiz_id = fields.Many2one(
comodel_name='res.partner.category',
- related="company_id.tag_id",
+ related="company_id.tag_cotiz_id",
readonly=False,
string='Etiquette de cotisation')
diff --git a/models/scop_cotisation.py b/models/scop_cotisation.py
index 32a95d6ede87403827617a142073548d6273e422..2c1bbf2df22b5bafb98a10c3b84e7d6dd5837953 100644
--- a/models/scop_cotisation.py
+++ b/models/scop_cotisation.py
@@ -73,10 +73,10 @@ class ScopCotisation(models.AbstractModel):
@api.multi
def _compute_recipient(self):
- tag_id = self.env.user.company_id.tag_id
+ tag_cotiz_id = self.env.user.company_id.tag_cotiz_id
for cotiz in self:
child_ids = cotiz.partner_id.child_ids.filtered(
- lambda child: (tag_id in child.category_id) and child.email
+ lambda child: (tag_cotiz_id in child.category_id) and child.email
)
if cotiz.partner_id.email:
cotiz.recipient_ids = cotiz.partner_id + child_ids