19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:28 +01:00
parent ff721d030e
commit 7721452493
1826 changed files with 124775 additions and 274114 deletions

View file

@ -12,9 +12,9 @@ class ResPartner(models.Model):
@api.depends('vat', 'country_id')
def _compute_company_registry(self):
# OVERRIDE
# If a belgian company has a VAT number then it's company registry is it's VAT Number (without country code).
# If a belgian company has a VAT number then its company registry is its VAT Number (without country code).
super()._compute_company_registry()
for partner in self.filtered(lambda p: p.country_id.code == 'BE' and p.vat):
for partner in self.filtered(lambda p: p._deduce_country_code() == 'BE' and p.vat):
vat_country, vat_number = self._split_vat(partner.vat)
if vat_country == 'be' and self.simple_vat_check(vat_country, vat_number):
if vat_country in ('BE', '') and self._check_vat_number('BE', vat_number):
partner.company_registry = vat_number