Skip to content
Snippets Groups Projects
Commit d1604542 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] base_vat: Albania

The module `vatnumber` (which is not maintained anymore) uses an
incorrect validation method for Albanian VAT numbers. Therefore, we use
the library `stdnum`, on which `vatnumber` relies for most cases.

opw-1912680

closes odoo/odoo#29280
parent 3b39c31a
No related branches found
No related tags found
No related merge requests found
......@@ -361,3 +361,10 @@ class ResPartner(models.Model):
return int(vat[9]) == c1 and int(vat[10]) == c2
return False
def check_vat_al(self, vat):
try:
import stdnum.al
return stdnum.al.vat.is_valid(vat)
except ImportError:
return True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment