Saturday, May 23, 2026
2 changes · 18.0
Resolved issues and error corrections
This update resolves an issue that prevented users from creating bank accounts when a falsy value (like empty string) was entered for the proxy type (CPF/CNPJ or Random Key). The fix ensures the validation process handles these values correctly, preventing a traceback and allowing successful bank account creation. This improves the reliability of the BR accounting module.
Original PR description
Creating a bank account with a falsy proxy value generates a traceback. Steps to reproduce the error: - Install ``l10n_br`` module with demo data - Switch to BR Company - Go to Contacts >…
Creating a bank account with a falsy proxy value generates a traceback. Steps to reproduce the error: - Install ``l10n_br`` module with demo data - Switch to BR Company - Go to Contacts > Configuration > Bank Accounts > Create a new bank account > Add any value as Account Number > Account Holder: BR Company > Proxy Type: CPF/CNPJ(BR) or Random Key (BR) > Save Traceback: ```py InvalidFormat: The number has an invalid format. ``` ```py TypeError: 'bool' object is not iterable ``` https://github.com/odoo/odoo/blob/132f042ca14012877f608783b57a0ca9c4e565f3/addons/l10n_br/models/res_partner_bank.py#L38-L45 For ``CPF/CNPJ`` validation, calling ``check_vat_br`` with a falsy proxy value raises a traceback. https://github.com/odoo/odoo/blob/132f042ca14012877f608783b57a0ca9c4e565f3/addons/l10n_br/models/res_partner_bank.py#L56-L61 For ``Random Key`` validation, ``re.fullmatch`` expects a string value, but receives ``False``, leading to a traceback. sentry-7488238698 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where users without VAT numbers could inadvertently use Nemhandel and generate unnecessary OIOUBL XML files. The change ensures that Nemhandel functionality is only available to partners with valid VAT registration, streamlining processes and reducing potential errors. This improves data accuracy and compliance.
Original PR description
Users with no VAT number shouldn't be able to use Nemhandel and shouldn't have a OIOUBL xml generated. task-6196225