diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index 7ef3514..eae82b5 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.py @@ -179,6 +179,12 @@ class EbicsFile(models.Model): return True 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( [("name", "=ilike", currency_code)], limit=1 ) 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 09dcded..3f1519d 100644 --- a/account_ebics_oca_statement_import/wizards/account_statement_import.py +++ b/account_ebics_oca_statement_import/wizards/account_statement_import.py @@ -62,7 +62,7 @@ class AccountStatementImport(models.TransientModel): "Statement %(st_name)s dated %(date)s " "has already been imported.", st_name=st_vals["name"], - date=st_vals["date"].strftime("%Y-%m-%d"), + date=st_vals["date"], ) )