correct problem for sending invoice emails

This commit is contained in:
Kristof Bernaert
2026-02-01 17:03:22 +01:00
parent 903858fd8a
commit 428f7b062c
2 changed files with 15 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
from odoo import models
class AccountMove(models.Model):
_inherit = "account.move"
def _send_invoice(self):
if self.env.context.get("force_email") or self.env.context.get("mark_invoice_as_sent"):
return super(
AccountMove,
self.with_context(active_test=False)
)._send_invoice()
return super()._send_invoice()