odoo/odoo#114488
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:master-14.0-base_vat-fix-albanian-tax-id-jula-1DCQ-fw
- head
- f156f0a7ac2eb66ab59543d8720b04e9a3aaeeb8
- merged
- 2 years ago by Nicolas Viseur (vin)
odoo/odoo | |
---|---|
14.0 | #114006 |
15.0 | #114438 |
saas-15.2 | #114454 |
16.0 | #114463 |
saas-16.1 | #114479 |
17.0 | |
18.0 | |
saas-18.1 | |
saas-18.2 | |
saas-18.3 | |
master | #114488 |
[FW][FIX] base_vat: support for 2020 Albanian Tax ID
Description of the issue this PR addresses:
The first character of a Tax ID from Albania is a letter representing the decade in which it has been issued. The letter M represents the current decade. (This pdf explains in details how it is formated: https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Albania-TIN.pdf).
Currently the way Albanian Tax IDs are validated is through the python library python-stdnum
. However, the regex that is used to validate them has not been updated since 2017. (I made a PR in its repo arthurdejong/python-stdnum#402 to fix that).
The code from this commit is inspired by the one from that library, but the regex includes the letter M.
Current behavior before PR:
(base_vat
must be installed)
By going to Settings > Users & Companies > [A company]:
- Set the country to Albania
- Set VAT/Tax ID to “M12345678T”.
=> Error message
Forward-Port-Of: #114006