[FIX] mail: restore send after commit behavior for notification emails
Previously to commit [1] notification emails were send using the after commit hook (see [2] for related code move and [3] for original code). That commit changed the parameter default value without any reason, meaning this mechanism is not used anymore. This commit fixes that behavior. [1] See commit581a74143e: code cleaning [2] See commit7a6269719f: code move [3] See commit38e181ee2c: use of post-commit hook in mail closes odoo/odoo#34645 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
This commit is contained in:
@@ -2029,7 +2029,7 @@ class MailThread(models.AbstractModel):
|
||||
self.env['bus.bus'].sudo().sendmany(notifications)
|
||||
return True
|
||||
|
||||
def _notify_record_by_email(self, message, partners_data, msg_vals=False, model_description=False, mail_auto_delete=True, send_after_commit=False):
|
||||
def _notify_record_by_email(self, message, partners_data, msg_vals=False, model_description=False, mail_auto_delete=True, send_after_commit=True):
|
||||
""" Method to send email linked to notified messages.
|
||||
:param message: mail.message record to notify;
|
||||
:param partners_data: partner to notify by email coming from _notify_compute_recipients
|
||||
|
||||
Reference in New Issue
Block a user