mirror of
https://github.com/brain-tec/account_ebics.git
synced 2026-10-16 07:49:07 +00:00
Merge pull request #115 from Noviat/18.0
Syncing from upstream Noviat/account_ebics (18.0)
This commit is contained in:
7 files changed
+50
-20
No files matched your search
@@ -15,7 +15,7 @@ Available addons
|
|||||||
----------------
|
----------------
|
||||||
addon | version | maintainers | summary
|
addon | version | maintainers | summary
|
||||||
--- | --- | --- | ---
|
--- | --- | --- | ---
|
||||||
[account_ebics](account_ebics/) | 18.0.1.2.1 | | Download bank statements and upload payment files directly from Odoo, using the European EBICS standard
|
[account_ebics](account_ebics/) | 18.0.1.2.2 | | Download bank statements and upload payment files directly from Odoo, using the European EBICS standard
|
||||||
[account_ebics_batch](account_ebics_batch/) | 18.0.1.0.1 | | Download and process your EBICS files automatically, on a schedule
|
[account_ebics_batch](account_ebics_batch/) | 18.0.1.0.1 | | Download and process your EBICS files automatically, on a schedule
|
||||||
[account_ebics_batch_payment](account_ebics_batch_payment/) | 18.0.1.2.0 | | Send an Odoo Enterprise batch payment to the bank over EBICS
|
[account_ebics_batch_payment](account_ebics_batch_payment/) | 18.0.1.2.0 | | Send an Odoo Enterprise batch payment to the bank over EBICS
|
||||||
[account_ebics_oca_statement_import](account_ebics_oca_statement_import/) | 18.0.1.0.1 | | Process EBICS statement files with the OCA bank statement import
|
[account_ebics_oca_statement_import](account_ebics_oca_statement_import/) | 18.0.1.0.1 | | Process EBICS statement files with the OCA bank statement import
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"Download bank statements and upload payment files directly from Odoo, "
|
"Download bank statements and upload payment files directly from Odoo, "
|
||||||
"using the European EBICS standard"
|
"using the European EBICS standard"
|
||||||
),
|
),
|
||||||
"version": "18.0.1.2.1",
|
"version": "18.0.1.2.2",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"author": "Noviat",
|
"author": "Noviat",
|
||||||
"website": "https://www.noviat.com/",
|
"website": "https://www.noviat.com/",
|
||||||
|
|||||||
@@ -1148,6 +1148,12 @@ msgstr ""
|
|||||||
msgid "No bank defined for the financial journal of the EBICS Config"
|
msgid "No bank defined for the financial journal of the EBICS Config"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_ebics
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_ebics/models/ebics_file.py:0
|
||||||
|
msgid "No currency found in statement for Account Number %(nbr)s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_ebics
|
#. module: account_ebics
|
||||||
#. odoo-python
|
#. odoo-python
|
||||||
#: code:addons/account_ebics/models/ebics_file.py:0
|
#: code:addons/account_ebics/models/ebics_file.py:0
|
||||||
|
|||||||
@@ -1225,6 +1225,12 @@ msgstr "Keine Bankkontonummer gefunden."
|
|||||||
msgid "No bank defined for the financial journal of the EBICS Config"
|
msgid "No bank defined for the financial journal of the EBICS Config"
|
||||||
msgstr "Keine Bank für das Finanzjournal der EBICS-Konfiguration definiert"
|
msgstr "Keine Bank für das Finanzjournal der EBICS-Konfiguration definiert"
|
||||||
|
|
||||||
|
#. module: account_ebics
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_ebics/models/ebics_file.py:0
|
||||||
|
msgid "No currency found in statement for Account Number %(nbr)s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_ebics
|
#. module: account_ebics
|
||||||
#. odoo-python
|
#. odoo-python
|
||||||
#: code:addons/account_ebics/models/ebics_file.py:0
|
#: code:addons/account_ebics/models/ebics_file.py:0
|
||||||
|
|||||||
@@ -1222,6 +1222,12 @@ msgstr "Aucun numéro de compte bancaire trouvé."
|
|||||||
msgid "No bank defined for the financial journal of the EBICS Config"
|
msgid "No bank defined for the financial journal of the EBICS Config"
|
||||||
msgstr "Aucune banque définie pour le journal financier de la config EBICS"
|
msgstr "Aucune banque définie pour le journal financier de la config EBICS"
|
||||||
|
|
||||||
|
#. module: account_ebics
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_ebics/models/ebics_file.py:0
|
||||||
|
msgid "No currency found in statement for Account Number %(nbr)s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_ebics
|
#. module: account_ebics
|
||||||
#. odoo-python
|
#. odoo-python
|
||||||
#: code:addons/account_ebics/models/ebics_file.py:0
|
#: code:addons/account_ebics/models/ebics_file.py:0
|
||||||
|
|||||||
@@ -1223,6 +1223,12 @@ msgstr "Geen bankrekeningnummer gevonden."
|
|||||||
msgid "No bank defined for the financial journal of the EBICS Config"
|
msgid "No bank defined for the financial journal of the EBICS Config"
|
||||||
msgstr "Geen bank gedefinieerd voor het financiële dagboek van de EBICS-config"
|
msgstr "Geen bank gedefinieerd voor het financiële dagboek van de EBICS-config"
|
||||||
|
|
||||||
|
#. module: account_ebics
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_ebics/models/ebics_file.py:0
|
||||||
|
msgid "No currency found in statement for Account Number %(nbr)s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_ebics
|
#. module: account_ebics
|
||||||
#. odoo-python
|
#. odoo-python
|
||||||
#: code:addons/account_ebics/models/ebics_file.py:0
|
#: code:addons/account_ebics/models/ebics_file.py:0
|
||||||
|
|||||||
@@ -586,9 +586,21 @@ class EbicsFile(models.Model):
|
|||||||
message = self.env._("No bank account number found.")
|
message = self.env._("No bank account number found.")
|
||||||
res["notifications"].append({"type": "error", "message": message})
|
res["notifications"].append({"type": "error", "message": message})
|
||||||
continue
|
continue
|
||||||
currency_code = stmt.xpath(
|
if not stmt.findall("ns:Ntry", ns):
|
||||||
|
continue
|
||||||
|
currency_codes = 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]
|
)
|
||||||
|
if not currency_codes and camt_variant == "054":
|
||||||
|
currency_codes = stmt.xpath("ns:Ntry/ns:Amt/@Ccy", namespaces=ns)
|
||||||
|
if not currency_codes:
|
||||||
|
message = self.env._(
|
||||||
|
"No currency found in statement for Account Number %(nbr)s.",
|
||||||
|
nbr=acc_number,
|
||||||
|
)
|
||||||
|
res["notifications"].append({"type": "error", "message": message})
|
||||||
|
continue
|
||||||
|
currency_code = currency_codes[0]
|
||||||
# some banks (e.g. COMMERZBANK) add the currency as the last 3 digits
|
# 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
|
# of the bank account number hence we need to remove this since otherwise
|
||||||
# the journal matching logic fails
|
# the journal matching logic fails
|
||||||
@@ -596,26 +608,20 @@ class EbicsFile(models.Model):
|
|||||||
acc_number = acc_number[:-3]
|
acc_number = acc_number[:-3]
|
||||||
|
|
||||||
root_new = deepcopy(root)
|
root_new = deepcopy(root)
|
||||||
entries = False
|
|
||||||
for j, el in enumerate(root_new[0].findall(f"ns:{camt_tag}", ns)):
|
for j, el in enumerate(root_new[0].findall(f"ns:{camt_tag}", ns)):
|
||||||
if j != i:
|
if j != i:
|
||||||
el.getparent().remove(el)
|
el.getparent().remove(el)
|
||||||
else:
|
currency, journal = self._lookup_journal(res, acc_number, currency_code)
|
||||||
entries = el.findall("ns:Ntry", ns)
|
if not (currency and journal):
|
||||||
if not entries:
|
|
||||||
continue
|
continue
|
||||||
else:
|
datas.append(
|
||||||
currency, journal = self._lookup_journal(res, acc_number, currency_code)
|
{
|
||||||
if not (currency and journal):
|
"acc_number": acc_number,
|
||||||
continue
|
"journal_id": journal.id,
|
||||||
datas.append(
|
"company_id": journal.company_id.id,
|
||||||
{
|
"data": base64.b64encode(etree.tostring(root_new)),
|
||||||
"acc_number": acc_number,
|
}
|
||||||
"journal_id": journal.id,
|
)
|
||||||
"company_id": journal.company_id.id,
|
|
||||||
"data": base64.b64encode(etree.tostring(root_new)),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
return datas
|
return datas
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user