diff --git a/mail_tracking/models/mail_bounced_mixin.py b/mail_tracking/models/mail_bounced_mixin.py index 9f26507b..e2d06305 100644 --- a/mail_tracking/models/mail_bounced_mixin.py +++ b/mail_tracking/models/mail_bounced_mixin.py @@ -31,8 +31,9 @@ class MailBouncedMixin(models.AbstractModel): partners = self.filtered(lambda r: not r.email_bounced) return partners.write({'email_bounced': True}) + @api.multi def write(self, vals): - [email_field] = self._primary_email + [email_field] = self[0]._primary_email if email_field not in vals: return super().write(vals) email = vals[email_field].lower() if vals[email_field] else False