Skip to content

[FW][FIX] base_vat: support for 2020 Albanian Tax ID #114488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Mar 6, 2023

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

__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 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

X-original-commit: f0b6e4c
@robodoo
Copy link
Contributor

robodoo commented Mar 6, 2023

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented Mar 6, 2023

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Mar 6, 2023
@C3POdoo C3POdoo added the RD research & development, internal work label Mar 6, 2023
@vin-odoo
Copy link
Contributor

vin-odoo commented Mar 7, 2023

@fw-bot r+

robodoo pushed a commit that referenced this pull request Mar 7, 2023
__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 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

closes #114488

X-original-commit: f0b6e4c
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
@robodoo robodoo added the 16.2 label Mar 7, 2023
@robodoo robodoo temporarily deployed to merge March 7, 2023 08:03 Inactive
@robodoo robodoo closed this Mar 7, 2023
@fw-bot fw-bot deleted the master-14.0-base_vat-fix-albanian-tax-id-jula-1DCQ-fw branch March 21, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
16.2 forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants