From 276cc1d6474b304f8740da23d5e9023d0023b265 Mon Sep 17 00:00:00 2001 From: dbkosky Date: Wed, 16 Feb 2022 16:28:27 +0000 Subject: [PATCH] [FIX] l10n_it_edi_sdicoop: fix bug where retry after notificaScarto does nothing Set the l10n_it_edi_transaction value on the invoice to false after receiving notificaScarto from the edi. This is so that the methods associated with posting the invoice will detect it again and process it for posting. Task-id: 2764978 X-original-commit: 925fc0ff3914e83ddaac4fd5f6c1bdb7b4b2c68b Part-of: odoo/odoo#84826 --- addons/l10n_it_edi_sdicoop/models/account_edi_format.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/l10n_it_edi_sdicoop/models/account_edi_format.py b/addons/l10n_it_edi_sdicoop/models/account_edi_format.py index f2431b96647..f327bb6f853 100644 --- a/addons/l10n_it_edi_sdicoop/models/account_edi_format.py +++ b/addons/l10n_it_edi_sdicoop/models/account_edi_format.py @@ -229,6 +229,7 @@ class AccountEdiFormat(models.Model): elif state == 'notificaScarto': errors = [element.find('Descrizione').text for element in response_tree.xpath('//Errore')] to_return[invoice] = {'error': self._format_error_message(_('The invoice has been refused by the Exchange System'), errors), 'blocking_level': 'error'} + invoice.l10n_it_edi_transaction = False elif state == 'notificaMancataConsegna': to_return[invoice] = { 'error': _('The E-invoice is not delivered to the addressee. The Exchange System is\