[FIX] l10n_it_edi: send credit note to edi

opw-2654793

closes odoo/odoo#77716

X-original-commit: 680b7cac3214dc107fa3d9ad6e2e807721673312
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2021-10-04 14:12:35 +00:00
parent 7ea4eeae86
commit e34ca20bc3
+1 -1
View File
@@ -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