2016-05-25 16:03:38 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
|
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
|
2016-10-24 11:46:07 +02:00
|
|
|
from odoo import models, fields, api
|
2016-05-25 16:03:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
class MailComposeMessage(models.TransientModel):
|
|
|
|
_inherit = 'mail.compose.message'
|
|
|
|
|
|
|
|
notify_followers = fields.Boolean(default=True)
|
|
|
|
|
|
|
|
@api.multi
|
2016-08-19 09:40:09 +02:00
|
|
|
def send_mail(self, auto_commit=False):
|
2016-05-25 16:03:38 +02:00
|
|
|
for wizard in self:
|
|
|
|
wizard = wizard.with_context(
|
|
|
|
notify_followers=wizard.notify_followers)
|
2016-08-19 09:40:09 +02:00
|
|
|
super(MailComposeMessage, wizard).send_mail(
|
|
|
|
auto_commit=auto_commit)
|
2016-05-25 16:03:38 +02:00
|
|
|
return {'type': 'ir.actions.act_window_close'}
|