diff --git a/addons/base_vat/models/res_partner.py b/addons/base_vat/models/res_partner.py index 936ba3596ae..af0f09ac077 100644 --- a/addons/base_vat/models/res_partner.py +++ b/addons/base_vat/models/res_partner.py @@ -333,7 +333,11 @@ class ResPartner(models.Model): vat = clean(vat, ' -.').upper().strip() - if not (len(vat) == 14): + # Remove the prefix + if vat.startswith("NL"): + vat = vat[2:] + + if not len(vat) == 12: return False # Check the format @@ -346,9 +350,6 @@ class ResPartner(models.Model): char_to_int['+'] = '36' char_to_int['*'] = '37' - # Remove the prefix - vat = vat[2:] - # 2 possible checks: # - For natural persons # - For non-natural persons and combinations of natural persons (company)