Files
odoo_source/addons/base_vat
Julien (jula) 8eb2893932 [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`](https://pypi.org/project/python-stdnum/).
However, the regex that is used to validate them has not been updated since 2017. (I made a PR in its repo https://github.com/arthurdejong/python-stdnum/pull/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

closes odoo/odoo#114488

X-original-commit: f0b6e4ccd8f7402a5d70b9d60d91e463073e5bde
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-03-07 08:02:33 +01:00
..