odoo/odoo#75399

Created by fw-bot
Merged at c976d3765c4a45824fc2fcb11b32b37e201711c2

Statuses:

label
odoo-dev:master-12.0-opw-2534541-pvh-8gYh-fw
head
f3eeb6539a93d8383b6bae5199fa6bda54aafa61
merged
4 years ago by pvh-odoo
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

[FW][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

Forward-Port-Of: #75232
Forward-Port-Of: #72910