From df17c4a1ca16377b1beda609abddadcf3edabe78 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Fri, 5 Sep 2025 16:57:23 +0200 Subject: [PATCH 1/2] [FIX] stack trace when OE camt parser discards a transaction line The Odoo Enterprise CAMT parser may drop transactions during import e.g. in case of duplicates or when a 0.00 amount transaction is added to give some banking information via the CAMT file. This PR fixes a stack trace that occurs when that happens. --- account_ebics/models/ebics_file.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index 75ac158..44e341f 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.py @@ -258,14 +258,18 @@ class EbicsFile(models.Model): errors = [] warnings = [] for notif in notifications: - if isinstance(notif, dict) and notif["type"] == "error": - error_cnt += 1 - parts = [notif[k] for k in notif if k in ("message", "details")] - errors.append("\n".join(parts)) - elif isinstance(notif, dict) and notif["type"] == "warning": - warning_cnt += 1 - parts = [notif[k] for k in notif if k in ("message", "details")] - warnings.append("\n".join(parts)) + if isinstance(notif, dict): + if notif.get("type") == "error": + error_cnt += 1 + parts = [notif[k] for k in notif if k in ("message", "details")] + errors.append("\n".join(parts) + "\n") + elif notif.get("type") == "warning": + warning_cnt += 1 + parts = [notif[k] for k in notif if k in ("message", "details")] + warnings.append("\n".join(parts) + "\n") + else: + warning_cnt += 1 + warnings.append(": ".join([*next(iter(notif.items()))]) + "\n") elif isinstance(notif, str): warning_cnt += 1 warnings.append(notif + "\n") From 4fbf3278ad4cae816f83d20bca82268a9d3ebd01 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Fri, 5 Sep 2025 18:05:54 +0200 Subject: [PATCH 2/2] account_ebics: bump module version --- README.md | 2 +- account_ebics/__manifest__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ae87fe..1c46f40 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- -[account_ebics](account_ebics/) | 18.0.1.0.2 | | EBICS banking protocol +[account_ebics](account_ebics/) | 18.0.1.0.3 | | EBICS banking protocol [account_ebics_batch](account_ebics_batch/) | 18.0.1.0.0 | | EBICS Files automated import and processing [account_ebics_batch_payment](account_ebics_batch_payment/) | 18.0.1.0.0 | | Upload Batch Payment via EBICS [account_ebics_oca_statement_import](account_ebics_oca_statement_import/) | 18.0.1.0.0 | | Use OCA Bank Statement Import with account_ebics diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index 154190e..534df97 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS banking protocol", - "version": "18.0.1.0.2", + "version": "18.0.1.0.3", "license": "LGPL-3", "author": "Noviat", "website": "https://www.noviat.com/",