[FIX] base_vat: properly return vat check for HU VAT

Before the fix the check function is assigned a boolean, which causes an
error when trying to call the function.

After the fix the result of the check is returned.

closes odoo/odoo#139407

X-original-commit: ea2798c5893373d79f70959e4501d0eef4f964b7
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
JordiMForgeFlow
2023-10-21 03:53:38 +00:00
parent 7414b6b850
commit 464e280428
+1 -3
View File
@@ -306,9 +306,7 @@ class ResPartner(models.Model):
if individual:
return True
# Check the vat number
check_func = stdnum.util.get_cc_module('hu', 'vat').is_valid(vat)
if check_func is not None:
return check_func(vat)
return stdnum.util.get_cc_module('hu', 'vat').is_valid(vat)
__check_vat_ch_re = re.compile(r'E([0-9]{9}|-[0-9]{3}\.[0-9]{3}\.[0-9]{3})(MWST|TVA|IVA)$')