From 3f32d8a28597cd5dbda026d6bc501cf37afd6ce2 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Sun, 17 Sep 2023 15:57:52 +0200 Subject: [PATCH 1/2] [16.0]account_statement_import - fix super() --- account_ebics_oca_statement_import/__manifest__.py | 2 +- .../wizards/account_statement_import.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/account_ebics_oca_statement_import/__manifest__.py b/account_ebics_oca_statement_import/__manifest__.py index afbca14..321f257 100644 --- a/account_ebics_oca_statement_import/__manifest__.py +++ b/account_ebics_oca_statement_import/__manifest__.py @@ -4,7 +4,7 @@ { "name": "account_ebics with OCA Bank Statement Imoort", "summary": "Use OCA Bank Statement Import with account_ebics", - "version": "16.0.1.0.1", + "version": "16.0.1.0.2", "author": "Noviat", "website": "https://www.noviat.com/", "category": "Hidden", diff --git a/account_ebics_oca_statement_import/wizards/account_statement_import.py b/account_ebics_oca_statement_import/wizards/account_statement_import.py index 819cd02..dc33a96 100644 --- a/account_ebics_oca_statement_import/wizards/account_statement_import.py +++ b/account_ebics_oca_statement_import/wizards/account_statement_import.py @@ -46,7 +46,9 @@ class AccountStatementImport(models.TransientModel): We could also create empty bank statement (in state done) to clearly show days without transactions via the bank statement list view. """ - if self.env.context.get("active_model") == "ebics.file": + if self.env.context.get("active_model") != "ebics.file": + return super()._create_bank_statements(stmts_vals, result) + else: messages = [] transactions = False for st_vals in stmts_vals: From 7da964cd836189fddae455924311cfbf57663b16 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Sun, 17 Sep 2023 16:14:54 +0200 Subject: [PATCH 2/2] [16.0] add support for COMMERZBANK camt files --- account_ebics/__manifest__.py | 2 +- account_ebics/models/ebics_file.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index 16791e1..65003c0 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS banking protocol", - "version": "16.0.1.6.0", + "version": "16.0.1.6.1", "license": "LGPL-3", "author": "Noviat", "website": "https://www.noviat.com/", diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index 7ef3514..f27faa3 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.py @@ -550,6 +550,11 @@ class EbicsFile(models.Model): currency_code = stmt.xpath( "ns:Acct/ns:Ccy/text() | ns:Bal/ns:Amt/@Ccy", namespaces=ns )[0] + # some banks (e.g. COMMERZBANK) add the currency as the last 3 digits + # of the bank account number hence we need to remove this since otherwise + # the journal matching logic fails + if acc_number[-3:] == currency_code: + acc_number = acc_number[:-3] root_new = deepcopy(root) entries = False