From f974f328c47f95cc5461f1ba5a681fabd0b31317 Mon Sep 17 00:00:00 2001 From: Thomas Binsfeld Date: Fri, 19 Aug 2016 09:47:08 +0200 Subject: [PATCH] [FIX] Argument auto_commit in send_mail --- mail_optional_autofollow/wizard/mail_compose_message.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mail_optional_autofollow/wizard/mail_compose_message.py b/mail_optional_autofollow/wizard/mail_compose_message.py index 912a3d9..d7e6c39 100644 --- a/mail_optional_autofollow/wizard/mail_compose_message.py +++ b/mail_optional_autofollow/wizard/mail_compose_message.py @@ -22,8 +22,9 @@ class MailComposeMessage(models.TransientModel): followers on the related object""") @api.multi - def send_mail(self): + def send_mail(self, auto_commit=False): for wizard in self: super(MailComposeMessage, wizard.with_context( - mail_post_autofollow=wizard.autofollow_recipients)).send_mail() - return {'type': 'ir.actions.act_window_close'} + mail_post_autofollow=wizard.autofollow_recipients)).send_mail( + auto_commit=auto_commit) + return True