Merge PR #1093 into 16.0

Signed-off-by hbrunn
pull/1108/head
OCA-git-bot 2023-03-20 09:34:46 +00:00
commit 4b5827585a
1 changed files with 10 additions and 2 deletions

View File

@ -10,7 +10,15 @@ class MailComposeMessage(models.TransientModel):
notify_followers = fields.Boolean(default=True) notify_followers = fields.Boolean(default=True)
def _action_send_mail(self, auto_commit=False): def _action_send_mail(self, auto_commit=False):
result_mails_su, result_messages = (
self.env["mail.mail"].sudo(),
self.env["mail.message"],
)
for wizard in self: for wizard in self:
wizard = wizard.with_context(notify_followers=wizard.notify_followers) wizard = wizard.with_context(notify_followers=wizard.notify_followers)
super(MailComposeMessage, wizard)._action_send_mail(auto_commit=auto_commit) res_mail, res_message = super(MailComposeMessage, wizard)._action_send_mail(
return True auto_commit=auto_commit
)
result_mails_su += res_mail
result_messages += res_message
return result_mails_su, result_messages