diff --git a/mass_mailing_partner/__manifest__.py b/mass_mailing_partner/__manifest__.py index c70313c..f528523 100644 --- a/mass_mailing_partner/__manifest__.py +++ b/mass_mailing_partner/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Link partners with mass-mailing", - "version": "12.0.1.0.0", + "version": "12.0.1.0.1", "author": "Tecnativa, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/social", diff --git a/mass_mailing_partner/models/res_partner.py b/mass_mailing_partner/models/res_partner.py index e371b99..7e25558 100644 --- a/mass_mailing_partner/models/res_partner.py +++ b/mass_mailing_partner/models/res_partner.py @@ -32,7 +32,7 @@ class ResPartner(models.Model): @api.constrains('email') def _check_email_mass_mailing_contacts(self): for partner in self: - if not partner.email and self.sudo().mass_mailing_contact_ids: + if not partner.email and partner.sudo().mass_mailing_contact_ids: raise ValidationError(_( "This partner '%s' is linked to one or more mass " "mailing contact. Email must be assigned."