Skip to content

New BTW identification number (NL)#185

Closed
nim-odoo wants to merge 1 commit into
arthurdejong:masterfrom
nim-odoo:master
Closed

New BTW identification number (NL)#185
nim-odoo wants to merge 1 commit into
arthurdejong:masterfrom
nim-odoo:master

Conversation

@nim-odoo
Copy link
Copy Markdown

@nim-odoo nim-odoo commented Jan 9, 2020

As of January 1st 2020, a new BTW identification number has been
introduced in Netherlands.

This commit implements the new check algorithm.

The algorithm detail can be found in:
http://kleineondernemer.nl/index.php/nieuw-btw-identificatienummer-vanaf-1-januari-2020-voor-eenmanszaken

Note that this implementation already takes into account the following:

Op termijn kan de structuur met uitzondering van de landaanduiding op positie 1-2 en de 2 cijfers op positie 13-14 wijzigen.
Dat wil zeggen dat op de posities 3-12 cijfers, hoofdletters of de tekens ‘+’ en ‘*’ kunnen komen.

Even if positions 3-12 have still the format 9 digits + 'B', this might not be the case anymore in the future.

This aims to replace #183 and #184

@nim-odoo
Copy link
Copy Markdown
Author

nim-odoo commented Jan 9, 2020

Note: this was successfully tested with a list of ~2500 existing Dutch BTW numbers and the new ones from 2020:

NL001162938B28
NL002455799B11
NL001617419B92
NL001452330B47

I am checking the CI error at the moment.

As of January 1st 2020, a new BTW identification number has been
introduced in Netherlands.

This commit implements the new check algorithm.

The algorithm detail can be found in:
http://kleineondernemer.nl/index.php/nieuw-btw-identificatienummer-vanaf-1-januari-2020-voor-eenmanszaken

Closes #182
@nim-odoo
Copy link
Copy Markdown
Author

nim-odoo commented Jan 9, 2020

@arthurdejong Fixes #182, tests added and CI passing. Thanks

@arthurdejong
Copy link
Copy Markdown
Owner

Thanks for the fix. Since the stdnum module already had a Mod 97 implementation that was used instead in a9b3e90. The test numbers were really helpful though as it helped me better confirm the correct implementation.

nim-odoo referenced this pull request in odoo/odoo Jan 13, 2020
Steps to reproduce:
- install contacts and vat number validation
- setup your company country to "Netherlands"
- go to contacts > add a company > try to add a dutch vat number
 (NL264077921B03)

Previous behavior:
Proper vat numbers are considered unvalid and raise a ValidationError

Current behavior:
Specific check added for dutch vat numbers

Related:
http://kleineondernemer.nl/index.php/nieuw-btw-identificatienummer-vanaf-1-januari-2020-voor-eenmanszaken
https://business.gov.nl/regulation/using-checking-vat-numbers/
http://www.pruefziffernberechnung.de/U/USt-IdNr.shtml

opw-2166380

closes #42681

Signed-off-by: Nicolas Martinelli (nim) <[email protected]>
Co-authored-by: Nicolas Martinelli <[email protected]>
@arthurdejong
Copy link
Copy Markdown
Owner

Hi @nim-odoo,
Release 1.13 of python-stdnum was made that includes this fix. You may want to consider using this in Odoo.

@nim-odoo
Copy link
Copy Markdown
Author

Thanks!

nim-odoo referenced this pull request in odoo/odoo Jul 30, 2024
Steps to reproduce:
- install contacts and vat number validation
- setup your company country to "Netherlands"
- go to contacts > add a company > try to add a dutch vat number
 (NL264077921B03)

Previous behavior:
Proper vat numbers are considered unvalid and raise a ValidationError

Current behavior:
Specific check added for dutch vat numbers

Related:
http://kleineondernemer.nl/index.php/nieuw-btw-identificatienummer-vanaf-1-januari-2020-voor-eenmanszaken
https://business.gov.nl/regulation/using-checking-vat-numbers/
http://www.pruefziffernberechnung.de/U/USt-IdNr.shtml

opw-2166380

closes #43081

X-original-commit: b7a8268
Signed-off-by: Nicolas Martinelli (nim) <[email protected]>
Co-authored-by: Nicolas Martinelli <[email protected]>
xmo-odoo added a commit to odoo-dev/odoo that referenced this pull request Jul 30, 2024
dc673bf added this for the new 2020
identification numbers as stdnum didn't support them yet.

arthurdejong/python-stdnum#185 was merged and published as part of
stdnum 1.13, in master we currently require 1.17, so this code has
been dead a while.
robodoo pushed a commit to odoo/odoo that referenced this pull request Aug 1, 2024
dc673bf added this for the new 2020
identification numbers as stdnum didn't support them yet.

arthurdejong/python-stdnum#185 was merged and published as part of
stdnum 1.13, in master we currently require 1.17, so this code has
been dead a while.

Part-of: #175008
Signed-off-by: Wala Gauthier (gawa) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants