Required bank in bank accounts

The bank module makes the bank field required in bank accounts:

https://hg.tryton.org/modules/bank/file/tip/bank.py#l49

However we find that this field is not necessary in most of our customer uses, and it makes their lives harder, including the process of migrating from previous software.

For example, during the last financial crisis many banks disappeared in Spain and those were purchased by other banks. Bank account numbers remain the same but now owned by new entities.

So there’s no easy way to determine which is the current bank of a given account number (well, it requires googling a little bit).

The thing is that this information is introduced because Tryton requires it but it has no practical advantages.

Could we drop the required attribute in the bank field?

What do you think? Do others find themselves in the same situation?

Hi @albert, in India, all the bank accounts are maintained by a given bank. For every given bank account, the name of the bank is mandatory. Even in case of mergers of bank or closure of any bank, the bank name and its branch (upto the address of that bank’s branch) is mandatory.

AFAIK the BIC of the bank is required to generate the SEPA files. So a bank is required for IBAN bank accounts numbers.

Did you have any use case where a bank account is not linked to any bank?
From my understanding this is not possible (otherwise it won’t be a bank account but other account)

In Spain, bank account numbers include the bank code. We normally use this number to identify the bank related to an account when migrating from previous software

When the bank accounts are entered manually normally the user knows the bank which the account is realated to.

It seems it is not required:

https://hg.tryton.org/modules/account_payment_sepa/file/tip/template/pain.008.001.02.xml#l13

Of course in the real world a bank account has a bank but my question is the opposite. Do we really always need the bank introduced in Tryton? Is that information that we require to users really necessary for the usage of the application?

It us usually the case but not always. For example, you may have an account number that is from the Banesto. Banesto disappeard and was acquired by some other bank. So you either create “Banesto” as a Bank (which seems useless as it no longer exists) or you need to find out what other bank acquired it.

When we migrate customers from previous software we create a mapping from banesto (and other older banks) to their new owners, but when the user introduces that information they need to check manually or look at a “cheatsheet”.

I wondered if we really need all this or we’re doing it just to satisfy the system without a real use case.

Yes as the real world bank account has a bank I think we should store it.

I think it will be easier to directly relate the “Banesto” bank with “Banco Santander” (which is the bank that adquired banesto). This information is available on the banesto wikipedia page.

Or ask the owner of the bank account the bank which the account is related to.

Indeed we recently added the bank name to the account rec_name so it’s easier for the user to distinguish which bank account to use.

I am unsure about bank field on Account. As @pokoli I am expecting BIC information to be mandated for SEPA payment.

For me, the field that could be relaxed is Bank.party . If I have valuable information for my banks, I only set generic information for supplier’s bank (parties are named “Bank XXX” with XXX the BIC code)

Apparently since February 1st 2016, it is no more required to provide the BIC when using IBAN but I suspect that there will still be a lot of banks that would refuse the SEPA message without BIC.
Also the national bank code is always in the IBAN number, unfortunately python-stdnum has function to extract BIC from IBAN only for Belgian numbers (not astonishing as SWIFT is a belgian cooperative).
The bank module is only used by the account_statement and account_payment_sepa modules. For the statement only the bank account is used to find party owner.
For SEPA, the template relies on bank account having a bank but only in FinancialInstitution mainly for BIC which is officially no more required for other parties.
So I think we could remove the required constraints on the bank and party fields as long as we manage the empty cases in all SEPA messages and we enforce it for the company’s bank account.

Maybe can add also the country and the national code to the bank model.
This will allow us to pick the right bank for an given IBAN.

This should be managed by python-stdnum as it already does for Belgian.