You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
665 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import models, fields, api
  5. class MailComposeMessage(models.TransientModel):
  6. _inherit = 'mail.compose.message'
  7. notify_followers = fields.Boolean(default=True)
  8. @api.multi
  9. def send_mail(self, auto_commit=False):
  10. for wizard in self:
  11. wizard = wizard.with_context(
  12. notify_followers=wizard.notify_followers)
  13. super(MailComposeMessage, wizard).send_mail(
  14. auto_commit=auto_commit)
  15. return {'type': 'ir.actions.act_window_close'}