Merge branch '16-fix-camt-commerzbank' into '16.0'

[16.0] add support for COMMERZBANK camt files

See merge request Noviat/Noviat_Generic/accounting-ebics!10
This commit is contained in:
Luc De Meyer 2023-09-17 14:20:55 +00:00
commit 618467d81d
4 changed files with 10 additions and 3 deletions

View File

@ -3,7 +3,7 @@
{ {
"name": "EBICS banking protocol", "name": "EBICS banking protocol",
"version": "16.0.1.6.0", "version": "16.0.1.6.1",
"license": "LGPL-3", "license": "LGPL-3",
"author": "Noviat", "author": "Noviat",
"website": "https://www.noviat.com/", "website": "https://www.noviat.com/",

View File

@ -550,6 +550,11 @@ class EbicsFile(models.Model):
currency_code = stmt.xpath( currency_code = stmt.xpath(
"ns:Acct/ns:Ccy/text() | ns:Bal/ns:Amt/@Ccy", namespaces=ns "ns:Acct/ns:Ccy/text() | ns:Bal/ns:Amt/@Ccy", namespaces=ns
)[0] )[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) root_new = deepcopy(root)
entries = False entries = False

View File

@ -4,7 +4,7 @@
{ {
"name": "account_ebics with OCA Bank Statement Imoort", "name": "account_ebics with OCA Bank Statement Imoort",
"summary": "Use OCA Bank Statement Import with account_ebics", "summary": "Use OCA Bank Statement Import with account_ebics",
"version": "16.0.1.0.1", "version": "16.0.1.0.2",
"author": "Noviat", "author": "Noviat",
"website": "https://www.noviat.com/", "website": "https://www.noviat.com/",
"category": "Hidden", "category": "Hidden",

View File

@ -46,7 +46,9 @@ class AccountStatementImport(models.TransientModel):
We could also create empty bank statement (in state done) to clearly We could also create empty bank statement (in state done) to clearly
show days without transactions via the bank statement list view. 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 = [] messages = []
transactions = False transactions = False
for st_vals in stmts_vals: for st_vals in stmts_vals: