[15.0][FIX] base_vat_optional_vies: ensure vies check do not block contact update
This commit is contained in:
parent
13d8ad43f6
commit
0dc3b1e965
@ -29,6 +29,12 @@ class ResPartner(models.Model):
|
||||
# call simple_vat_check and thus the flag will be removed
|
||||
partner.update({"vies_passed": True})
|
||||
res = super(ResPartner, self).vies_vat_check(country_code, vat_number)
|
||||
if res is False:
|
||||
if partner:
|
||||
partner.update({"vies_passed": False})
|
||||
return self.simple_vat_check(country_code, vat_number)
|
||||
elif partner:
|
||||
partner.update({"vies_passed": True})
|
||||
return res
|
||||
|
||||
@api.constrains("vat", "country_id")
|
||||
|
Loading…
Reference in New Issue
Block a user