OCA / l10n-switzerland

Odoo Swiss localization
GNU Affero General Public License v3.0
53 stars 164 forks source link

[12.0] Fix l10n_ch_base_bank account type calculation #599

Closed santostelmo closed 3 years ago

santostelmo commented 3 years ago

Account number is changed in _update_acc_name to have a structure like parner / Postal number acc_number. https://github.com/OCA/l10n-switzerland/blob/a6f79e04d9d2e8c19f5592b5fe974be19c5f721f/l10n_ch_base_bank/models/bank.py#L289 The goal is to avoid duplicated bank accounts. But with this change, the type of the account is not recognized as postal anymore. So we consider valid if has substring "/Postal number" is found in account number

yvaucher commented 3 years ago

The type is not important in the modules. I don't think it's a good idea to do this.

Postal is not correct anyway. An account with an ISR subscription number (content of l10n_ch_postal) can be a bank account or a postal account. I would be more in favor or removing the type postal which is useless.

The type field doesn't suit our use, because you could fill an IBAN in acc_number and an ISR subscription number in the l10n_ch_postal. In that case we can't put postal and iban in the type at the same time.

Thus I'm closing this.