odoo/enterprise#77879
Created by fw-bot
Merged
at 3588c03e3d86841ed0b7a04b1d4185db2a1b4211
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 1s)
Linked pull requests
- label
- odoo-dev:saas-18.1-17.0-opw-4447478-Moroccan_VAT_validation-mcou-0zTf-fw
- head
- a3e3b95ccb6ccfc558164c642937ec4001820b6b
- merged
- 1 year ago by Accounting, Florian Gilbert (flg)
| odoo/odoo | odoo/enterprise | |
|---|---|---|
| 17.0 | #194592 | |
| saas-17.2 | #194818 | #77876 |
| saas-17.4 | #194846 | #77877 |
| 18.0 | #194879 | #77878 |
| saas-18.1 | #194914 | #77879 |
| saas-18.2 | ||
| saas-18.3 | ||
| saas-18.4 | ||
| 19.0 | ||
| saas-19.1 | ||
| saas-19.2 | ||
| master | #194929 | #77880 |
[FW][DRAFT][FIX] base_vat: add a method to validate Moroccan VAT numbers
Steps to reproduce:
- Create a new Contact
- Set the country to Morocco
- Add "52258521" as a VAT number
- Try to validate -> Error
Cause:
Only occurs after saas-17.4 because it is related to the library stdnum. The version of this library change when the Python version is >3.11. As the SaaS version use Python3.12 since saas-17.4 and Python3.10 before, the bug only appears in saas-17.4, but this change targets 17.0 because 17.0 supports Python > 3.10.
The cause of the bug is the new version of the library which implements a verification method that corresponds to Moroccan ICE numbers and not VAT numbers.
Solution:
Create the method to check the Moroccan VAT numbers. The format is just a number with 8 digits.
Forward-Port-Of: #77878