mirror of
https://gitlab.com/flectra-community/bank-payment.git
synced 2024-11-22 13:42:07 +00:00
18 lines
571 B
Python
18 lines
571 B
Python
# Copyright 2024 Tecnativa - Carolina Fernandez
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
import json
|
|
|
|
from flectra import models
|
|
|
|
|
|
class MailComposeMessage(models.TransientModel):
|
|
_inherit = "mail.compose.message"
|
|
|
|
def _action_send_mail(self, auto_commit=False):
|
|
for wizard in self:
|
|
if self.env.context.get("is_sent"):
|
|
self.env[wizard.model].sudo().browse(
|
|
json.loads(wizard.res_ids)
|
|
).is_sent = True
|
|
return super()._action_send_mail(auto_commit=auto_commit)
|