Comment 2 for bug 567216

Revision history for this message
Eduard Carreras i Nadal (ecarreras) wrote : Re: base_vat is not working right

If you see the code in partner.py line 55 of base_vat module, there is a function called default_vat_check, it acts when the two first letters of the vat doesn't match on any check_vat_countyletters function.

def default_vat_check(self, cn, vn):
            # by default, a VAT number is valid if:
            # it starts with 2 letters
            # has more than 3 characters
            return len(vn) > 0 and len(cn) == 2 and cn[0] in string.ascii_lowercase and cn[1] in string.ascii_lowercase

IMHO is better return False than perform this check...