odoo/odoo#72910

Created by pvh-odoo
Merged at d8b8ad47e32d6a477e821778dd02b07fa5ca3ad9

Statuses:

label
odoo-dev:12.0-opw-2534541-pvh
head
0c53e8a096f9d9c0f666b1770689da4d6f3093a3
merged
4 years ago by Bugfix, Nicolas Lempereur (nle)
odoo/odoo
12.0 #72910
saas-12.3 #75185
13.0 #75186
14.0 #75189
saas-14.4 #75232
15.0
16.0
17.0
saas-17.4
18.0
saas-18.1
saas-18.2
saas-18.3
master #75399

[FIX] base_vat: properly checks XI VAT numbers

In 12.0+ when adding an XI (Northern Ireland) VAT number on a vendor and specifying the country as United Kingdom, an error shows the VAT number as not valid. This is because the method to check specifically XI VAT numbers doesn't recognize XI as a country, and thus uses the GB VAT number verification, which doesn't recognize XI VAT numbers as it isn't up to date yet.

A temporary method to check XI VAT number was already added, but is never called because XI is not recognized as a country.
With this commit, we add a list of known legitimate country codes that are not considered as such in Odoo.

opw-2534541