Browse Source

[FIX] Argument auto_commit in send_mail

pull/63/head
Thomas Binsfeld 8 years ago
committed by Laurent Mignon (ACSONE)
parent
commit
b0681746d4
  1. 5
      mail_optional_follower_notification/wizard/mail_compose_message.py

5
mail_optional_follower_notification/wizard/mail_compose_message.py

@ -11,9 +11,10 @@ class MailComposeMessage(models.TransientModel):
notify_followers = fields.Boolean(default=True) notify_followers = fields.Boolean(default=True)
@api.multi @api.multi
def send_mail(self):
def send_mail(self, auto_commit=False):
for wizard in self: for wizard in self:
wizard = wizard.with_context( wizard = wizard.with_context(
notify_followers=wizard.notify_followers) 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'} return {'type': 'ir.actions.act_window_close'}
Loading…
Cancel
Save