Closed bosd closed 2 months ago
@Tecnativa Can you have a look?
Please don't ping to Tecnativa, as it's altering our stats.
What would be an alternative way to search for the bban
which is encapsulated inside the BIC
?
As an exact match is not possible.
Source: https://www.swiftbic.com/what-is-bic-code.html
Example added from test in this pr:
NL36 INGB 0003445588
results in BBAN code INGB
.
It should match the bank with BIC INGBNL2A
Combined with the filter on the bank's country.code it is likely to hit only one result.
From the formatting of the BIC we could add country code after the bban code
to make it more resilliant.
"bic", "like", bank_code+country_code.upper())
result INGBNL
(But I don't see a way to add the last characters a.k.a. Location code 2A
so we could exact match.)
Anyway, AFAIK The BBB code is already designed to be unique. E.g. from some examples in Netherlands... | Code | Bank name | | ABNA | ABN AMRO BANK | | ABNC | ABN AMRO CLEARING BANK N.V |
For doing that, please create another module. Call it base_bank_from_bic
or similar.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.
Fixes issue #129
Before this PR the module worked counter intuitive. It relies on the field
code
which is introduced by the module itself.Since it is not a native odoo field. It is not populated with data from one of the bank list modules: e.g. https://github.com/OCA/l10n-croatia/tree/16.0/l10n_hr_bank https://github.com/OCA/l10n-netherlands/tree/14.0/l10n_nl_bank
An option was to populate that field. But then all these localization modules needed to be adjusted. AFAIK the field
code
has no real use case, then just to search. As opposed to a BIC field. Which could be used in payment (xml) files. And should be visible on invoices. Source: https://www.ecbs.org/iban.htmThis adds support to match a bank based upon the BIC code which is encapsulated inside the IBAN. Which is used by iban's from the following countries: UK, Netherlands, Bulgaria, Malta, Latvia, Romania, Gibraltar
https://en.wikipedia.org/wiki/International_Bank_Account_Number#IBAN_formats_by_country