From e34ca20bc3e392ce361fef465be9fcf4b87a92f3 Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Fri, 1 Oct 2021 14:29:39 +0000 Subject: [PATCH] [FIX] l10n_it_edi: send credit note to edi opw-2654793 closes odoo/odoo#77716 X-original-commit: 680b7cac3214dc107fa3d9ad6e2e807721673312 Signed-off-by: agr-odoo --- addons/l10n_it_edi/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_it_edi/models/account_invoice.py b/addons/l10n_it_edi/models/account_invoice.py index 74492bed126..d6370a5d777 100644 --- a/addons/l10n_it_edi/models/account_invoice.py +++ b/addons/l10n_it_edi/models/account_invoice.py @@ -188,7 +188,7 @@ class AccountMove(models.Model): # OVERRIDE posted = super()._post(soft=soft) - for move in posted.filtered(lambda m: m.l10n_it_send_state == 'to_send' and m.move_type == 'out_invoice' and m.company_id.country_id.code == 'IT'): + for move in posted.filtered(lambda m: m.l10n_it_send_state == 'to_send' and m.move_type in ['out_invoice', 'out_refund'] and m.company_id.country_id.code == 'IT'): move.send_pec_mail() return posted