Skip to content
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

Brexit and Northern Ireland: new VAT numbers starting with XI #64891

Closed
alexis-via opened this issue Jan 21, 2021 · 7 comments
Closed

Brexit and Northern Ireland: new VAT numbers starting with XI #64891

alexis-via opened this issue Jan 21, 2021 · 7 comments
Assignees
Labels
12.0 13.0 14.0 Accounting OE the report is linked to a support ticket (opw-...)

Comments

@alexis-via
Copy link
Contributor

Following Brexit on January 1st 2021, companies in Northern Ireland have a new VAT number starting with XI instead of GB. More info: https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

Tested on runbot v14: when I create a new company with country = United Kingdom and VAT number starting with XI, i get an error "The VAT number [XI.......] for partner [.......] does not seem to be valid. Note: the expected format is GB123456782".

For my test, I used the following VAT number which is considered valid by VIES:
vat_xi_vies

I also opened a bug on python-stdnum about this, cf arthurdejong/python-stdnum#250

@Yenthe666
Copy link
Collaborator

@oco-odoo @qdp-odoo this is for your interest & might need a quite soon fix actually.

@alexis-via
Copy link
Contributor Author

Support for VAT numbers starting with XI has been added in stdnum lib tonight. If you update stdnum to the master branch and you create a partner with the VAT number of my screenshot and country = United Kingdom, it will be accepted.

It seems to me that the code in base_vat needs a serious cleanup. I already opened another bug report about VIES check which doesn't work in v14 cf #64897
But I discovered other strange things:

  • the method fix_eu_vat_number() is never called
  • the dict _eu_country_vat_inverse which is built from _eu_country_vat has country codes as upper letters and it is read by the method simple_vat_check() which uses country_code with lower letters.

Maybe this cleanup would be an opportunity to simplify the code and use stdnum.vatin which is designed to check VAT numbers for all countries:

Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from stdnum.vatin import is_valid
>>> is_valid('FR86792377731')
True
>>> is_valid('CHE-109.298.651 TVA')
True

@Yenthe666 Yenthe666 added the OE the report is linked to a support ticket (opw-...) label Feb 2, 2021
@Yenthe666
Copy link
Collaborator

OPW 2451954

@alexis-via
Copy link
Contributor Author

FYI, as you can see in the latest comments on this PR arthurdejong/python-stdnum#251, a new "Bexit-compliant" release of stdnum will be made on pypi in the coming days. This release will have support for the XI VAT numbers.

@alexis-via
Copy link
Contributor Author

FYI, stdnum 1.16 has been released today with support for the new XI VAT numbers of Northern Ireland https://pypi.org/project/python-stdnum/1.16/ I tested this new release of stdnum and it works fine.

@Yenthe666
Copy link
Collaborator

I've asked Odoo to update their packaging etc :) Looks like a lot of Odoo installs will need a python-stdnum update to 1.16 I guess.

@william-andre william-andre self-assigned this Feb 14, 2021
@william-andre
Copy link
Contributor

python3-stdnum will be on Debian bullseye https://packages.debian.org/bullseye/python3-stdnum
That freeze is expected 2021-03-12 https://wiki.debian.org/DebianBullseye
We would also like to support it for Ubuntu, where 1.16 will be available for Hirsute https://packages.ubuntu.com/hirsute/python3-stdnum
That freeze is expected 2021-04-22 https://discourse.ubuntu.com/t/hirsute-hippo-release-schedule/18539

Until then, we should patch it in base_vat.

agr-odoo added a commit to odoo-dev/odoo that referenced this issue Mar 2, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322
agr-odoo added a commit to odoo-dev/odoo that referenced this issue Mar 2, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322
robodoo pushed a commit that referenced this issue Mar 2, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
#64891

opw-2461322

closes #67064

Signed-off-by: William André (wan) <wan@odoo.com>
fw-bot pushed a commit to odoo-dev/odoo that referenced this issue Mar 2, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 5d0fb2f
fw-bot pushed a commit to odoo-dev/odoo that referenced this issue Mar 2, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 5d0fb2f
fw-bot pushed a commit to odoo-dev/odoo that referenced this issue Mar 2, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 5d0fb2f
fw-bot pushed a commit to odoo-dev/odoo that referenced this issue Mar 2, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 5d0fb2f
fw-bot pushed a commit to odoo-dev/odoo that referenced this issue Mar 2, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 5d0fb2f
agr-odoo added a commit to odoo-dev/odoo that referenced this issue Mar 5, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 5d0fb2f
robodoo pushed a commit that referenced this issue Mar 5, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
#64891

opw-2461322

closes #67083

X-original-commit: 5d0fb2f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
robodoo pushed a commit that referenced this issue Mar 5, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
#64891

opw-2461322

closes #67091

X-original-commit: 5d0fb2f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
agr-odoo added a commit to odoo-dev/odoo that referenced this issue Mar 8, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 049ea81
robodoo pushed a commit that referenced this issue Mar 8, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
#64891

opw-2461322

closes #67402

X-original-commit: 049ea81
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
fw-bot pushed a commit to odoo-dev/odoo that referenced this issue Mar 8, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 7e7d873
fw-bot pushed a commit to odoo-dev/odoo that referenced this issue Mar 8, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 7e7d873
agr-odoo added a commit to odoo-dev/odoo that referenced this issue Mar 8, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

X-original-commit: 7e7d873
robodoo pushed a commit that referenced this issue Mar 8, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
#64891

opw-2461322

closes #67473

X-original-commit: 7e7d873
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
robodoo pushed a commit that referenced this issue Mar 9, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
#64891

opw-2461322

closes #67472

X-original-commit: 7e7d873
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
robodoo pushed a commit that referenced this issue Mar 9, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
#64891

opw-2461322

closes #67467

X-original-commit: 7e7d873
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
ghost pushed a commit to brain-tec/odoo that referenced this issue Apr 9, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

closes odoo#67064

Signed-off-by: William André (wan) <wan@odoo.com>
(cherry picked from commit 5d0fb2f)
fmdl pushed a commit to fmdl/odoo that referenced this issue Apr 29, 2021
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
arthurdejong/python-stdnum@b93d695
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
odoo#64891

opw-2461322

closes odoo#67402

X-original-commit: 049ea81
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
12.0 13.0 14.0 Accounting OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

No branches or pull requests

3 participants