From a879051cbbe402043d256aeb680201e7c2a957b9 Mon Sep 17 00:00:00 2001 From: Yann Leroux <66334199+yle-scopea@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:52:01 +0200 Subject: [PATCH 1/2] [16.0][FIX] p7m file encoded twice Sometimes suppliers encode the file twice. The first step to decode the file is not enough. Change the behaviour to be able to decode the file until it not coded in b64 --- l10n_it_fatturapa/__manifest__.py | 2 +- l10n_it_fatturapa/models/ir_attachment.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/l10n_it_fatturapa/__manifest__.py b/l10n_it_fatturapa/__manifest__.py index 02189062ee5..7e5a00c92f2 100644 --- a/l10n_it_fatturapa/__manifest__.py +++ b/l10n_it_fatturapa/__manifest__.py @@ -6,7 +6,7 @@ { "name": "ITA - Fattura elettronica - Base", - "version": "16.0.1.3.0", + "version": "16.0.1.3.1", "category": "Localization/Italy", "summary": "Fatture elettroniche", "author": "Davide Corio, Agile Business Group, Innoviu, " diff --git a/l10n_it_fatturapa/models/ir_attachment.py b/l10n_it_fatturapa/models/ir_attachment.py index 52a90a09a39..b7241904d7b 100644 --- a/l10n_it_fatturapa/models/ir_attachment.py +++ b/l10n_it_fatturapa/models/ir_attachment.py @@ -117,7 +117,7 @@ def get_xml_string(self, attachment=None): except binascii.Error as e: raise UserError(_("Corrupted attachment %s.") % e.args) from e - if is_base64(data): + while is_base64(data): try: data = base64.b64decode(data) except binascii.Error as e: From 189925a81f716d3f62408e879967f5c4a3e560ec Mon Sep 17 00:00:00 2001 From: Yann Leroux <66334199+yle-scopea@users.noreply.github.com> Date: Tue, 15 Oct 2024 13:13:28 +0200 Subject: [PATCH 2/2] [16.0][FIX] p7m file encoded twice --- l10n_it_fatturapa/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_it_fatturapa/__manifest__.py b/l10n_it_fatturapa/__manifest__.py index 7e5a00c92f2..02189062ee5 100644 --- a/l10n_it_fatturapa/__manifest__.py +++ b/l10n_it_fatturapa/__manifest__.py @@ -6,7 +6,7 @@ { "name": "ITA - Fattura elettronica - Base", - "version": "16.0.1.3.1", + "version": "16.0.1.3.0", "category": "Localization/Italy", "summary": "Fatture elettroniche", "author": "Davide Corio, Agile Business Group, Innoviu, "