2016-05-25 16:03:38 +02:00
|
|
|
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
|
2019-11-29 16:01:16 +01:00
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
2016-05-25 16:03:38 +02:00
|
|
|
|
2019-12-06 11:49:27 +01:00
|
|
|
from odoo import fields, models
|
2016-05-25 16:03:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
class MailComposeMessage(models.TransientModel):
|
2019-12-06 11:37:20 +01:00
|
|
|
_inherit = "mail.compose.message"
|
2016-05-25 16:03:38 +02:00
|
|
|
|
|
|
|
notify_followers = fields.Boolean(default=True)
|
|
|
|
|
2022-03-09 16:02:48 +01:00
|
|
|
def _action_send_mail(self, auto_commit=False):
|
2016-05-25 16:03:38 +02:00
|
|
|
for wizard in self:
|
2019-12-06 11:49:27 +01:00
|
|
|
wizard = wizard.with_context(notify_followers=wizard.notify_followers)
|
2022-03-09 16:02:48 +01:00
|
|
|
super(MailComposeMessage, wizard)._action_send_mail(auto_commit=auto_commit)
|
2019-12-06 11:49:27 +01:00
|
|
|
return True
|