From fcd4000934294aae43a5b2c07a4c6d324314a115 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 912a3d91..d7e6c399 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