mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-23 20:52:04 +00:00
[FIX][MOD] Fix error and adapt code to find some specific journals
This commit is contained in:
parent
4a2b7b44ab
commit
7aaab81293
@ -179,6 +179,12 @@ class EbicsFile(models.Model):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def _lookup_journal(self, res, acc_number, currency_code):
|
def _lookup_journal(self, res, acc_number, currency_code):
|
||||||
|
|
||||||
|
# Some bank accounts contain the currency code at the end, and this causes problems when searching for
|
||||||
|
# journals with that bank account number
|
||||||
|
if acc_number and currency_code and acc_number[-3:] == currency_code.upper():
|
||||||
|
acc_number = acc_number[:-3]
|
||||||
|
|
||||||
currency = self.env["res.currency"].search(
|
currency = self.env["res.currency"].search(
|
||||||
[("name", "=ilike", currency_code)], limit=1
|
[("name", "=ilike", currency_code)], limit=1
|
||||||
)
|
)
|
||||||
|
@ -62,7 +62,7 @@ class AccountStatementImport(models.TransientModel):
|
|||||||
"Statement %(st_name)s dated %(date)s "
|
"Statement %(st_name)s dated %(date)s "
|
||||||
"has already been imported.",
|
"has already been imported.",
|
||||||
st_name=st_vals["name"],
|
st_name=st_vals["name"],
|
||||||
date=st_vals["date"].strftime("%Y-%m-%d"),
|
date=st_vals["date"],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user