From a1eba533869d3ae9535ca40c9206845adca998ab Mon Sep 17 00:00:00 2001 From: Kristof Bernaert Date: Sun, 1 Feb 2026 17:29:40 +0100 Subject: [PATCH] correct problem for sending invoice emails --- allow_mail_archived_partner/models/account_move.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/allow_mail_archived_partner/models/account_move.py b/allow_mail_archived_partner/models/account_move.py index 530fd26..f4ab26e 100755 --- a/allow_mail_archived_partner/models/account_move.py +++ b/allow_mail_archived_partner/models/account_move.py @@ -8,8 +8,8 @@ from odoo import models class AccountMove(models.Model): _inherit = "account.move" - def _send_invoice(self): - _logger.error("🔥🔥🔥 CUSTOM _send_invoice HIT 🔥🔥🔥") - _logger.error("🔥 Context: %s", dict(self.env.context)) + def action_send_and_print(self): + _logger.error("🔥🔥🔥 CUSTOM action_send_and_print HIT 🔥🔥🔥") + _logger.error("🔥 Context at entry: %s", dict(self.env.context)) - return super(AccountMove, self.with_context(active_test=False))._send_invoice() + return super().action_send_and_print()