Thursday, February 19, 2026
1 change · saas-18.4
Enhancements to existing features
Payment references are now validated against the rules for the bank account's country, instead of being accepted just because they match another country's format. This helps prevent payment issues caused by using a structured reference that the relevant bank may reject, while still supporting a standard fallback for unsupported countries.
Original PR description
Currently, when initiating a payment, we check if the reference is a structured one by using `is_valid_structured_reference` which checks the validity of the structure accross all supported countries. This can lead to issues when it matches formats accepted by other countries but not the one of the bank account. With this commit, we replace this check by a call to a new function that checks the structure validity according to the country of the bank account, with a fallback to the generic check (ISO 11649) if the country is not supported. opw-5387269 Forward-Port-Of: odoo/odoo#248926 Forward-Port-Of: odoo/odoo#248194