From 7408eef9718ed758de8af32133f7ce632a7fea98 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Tue, 16 Aug 2022 14:53:20 +0000 Subject: [PATCH] [FIX] l10n_eg_edi_eta: avoid infinite loop by setting the blocking level to error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If you have only blocking level warning/info and the batch is bigger than 25, then it will generate an infinite loop. In order to avoid that, when an invoice is still to be signed we put it in error, also because a manual intervention of the user is required anyways. closes odoo/odoo#98322 X-original-commit: a707934ac0494b707975b96c18fddfd7b5ef8b9f Signed-off-by: William André (wan) --- addons/l10n_eg_edi_eta/models/account_edi_format.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_eg_edi_eta/models/account_edi_format.py b/addons/l10n_eg_edi_eta/models/account_edi_format.py index d49fa967885..907820909c9 100644 --- a/addons/l10n_eg_edi_eta/models/account_edi_format.py +++ b/addons/l10n_eg_edi_eta/models/account_edi_format.py @@ -348,7 +348,7 @@ class AccountEdiFormat(models.Model): return { invoice: { 'error': _("An error occured in created the ETA invoice, please retry signing"), - 'blocking_level': 'info' + 'blocking_level': 'error' } } invoice_json = json.loads(invoice.l10n_eg_eta_json_doc_id.raw)['request'] @@ -356,7 +356,7 @@ class AccountEdiFormat(models.Model): return { invoice: { 'error': _("Please make sure the invoice is signed"), - 'blocking_level': 'info' + 'blocking_level': 'error' } } return {invoice: self._l10n_eg_edi_post_invoice_web_service(invoice)}