Browse Source

[FIX] write can be multi

12.3
Nicolas JEUDY 5 years ago
parent
commit
5f3b3b2ab2
  1. 3
      mail_tracking/models/mail_bounced_mixin.py

3
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

Loading…
Cancel
Save