diff --git a/addons/l10n_it_edi/models/account_invoice.py b/addons/l10n_it_edi/models/account_invoice.py index e1198a4919c..549bce2c4d2 100644 --- a/addons/l10n_it_edi/models/account_invoice.py +++ b/addons/l10n_it_edi/models/account_invoice.py @@ -248,7 +248,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'): + for move in posted.filtered(lambda m: m.l10n_it_send_state == 'to_send' and m.move_type == 'out_invoice'): move.send_pec_mail() return posted