From d0b462f9000eec1ad363a8275af01011a19c8697 Mon Sep 17 00:00:00 2001 From: Thomas Binsfeld Date: Fri, 19 Aug 2016 09:40:09 +0200 Subject: [PATCH] Argument auto_commit in send_mail --- .../wizard/mail_compose_message.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mail_optional_follower_notification/wizard/mail_compose_message.py b/mail_optional_follower_notification/wizard/mail_compose_message.py index b6bc905..0153bfe 100644 --- a/mail_optional_follower_notification/wizard/mail_compose_message.py +++ b/mail_optional_follower_notification/wizard/mail_compose_message.py @@ -11,9 +11,10 @@ class MailComposeMessage(models.TransientModel): notify_followers = fields.Boolean(default=True) @api.multi - def send_mail(self): + def send_mail(self, auto_commit=False): for wizard in self: wizard = wizard.with_context( notify_followers=wizard.notify_followers) - super(MailComposeMessage, wizard).send_mail() + super(MailComposeMessage, wizard).send_mail( + auto_commit=auto_commit) return {'type': 'ir.actions.act_window_close'}