Browse Source

Merge pull request #80 from acsone/9.0-fix_mail_optional_autofollow_send_mail_tbi

[FIX] Argument auto_commit in send_mail
pull/87/head
Pedro M. Baeza 8 years ago
committed by GitHub
parent
commit
3a5d722c15
  1. 7
      mail_optional_autofollow/wizard/mail_compose_message.py

7
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
Loading…
Cancel
Save