[FIX] l10n_it_edi: send only 'out_invoice' to SDI PEC server
For each move post the system send a PEC. This should not occur, as only outgoing invoice should be registered in the EDI system as e-invoice opw-2461496 closes odoo/odoo#67406 X-original-commit: 2bbe214e816902d7e0c85ca38fedbeece9c47e7d Signed-off-by: Josse Colpaert <jco@openerp.com> Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
This commit is contained in:
committed by
Andrea Grazioso (agr-odoo)
parent
469dd4cad9
commit
131d01ecaa
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user