diff --git a/addons/mail/models/mail_mail.py b/addons/mail/models/mail_mail.py index b03ca0a37b1d7..f3bbc49411f28 100644 --- a/addons/mail/models/mail_mail.py +++ b/addons/mail/models/mail_mail.py @@ -333,6 +333,7 @@ def _send(self, auto_commit=False, raise_exception=False, smtp_session=None): 'state': 'exception', 'failure_reason': _('Error without exception. Probably due do sending an email without computed recipients.'), }) + mail.flush() # Update notification in a transient exception state to avoid concurrent # update in case an email bounces while sending all emails related to current # mail record.