[IMP] base: update vat string based on company country vat label
In this commit, we update the vat string based on the company country vat label. TaskID - 47184 closes odoo/odoo#110373 X-original-commit: e5e29b7c40282a2e4ca2da841d9f8aebe6c17992 Signed-off-by: Fabien Pinckaers <fp@odoo.com> Signed-off-by: Bhavin Patel (bat) <bat@odoo.com>
This commit is contained in:
@@ -397,6 +397,10 @@ class Partner(models.Model):
|
||||
if (not view_id) and (view_type == 'form') and self._context.get('force_email'):
|
||||
view_id = self.env.ref('base.view_partner_simple_form').id
|
||||
arch, view = super()._get_view(view_id, view_type, **options)
|
||||
company = self.env.company
|
||||
if company.country_id.vat_label:
|
||||
for node in arch.xpath("//field[@name='vat']"):
|
||||
node.attrib["string"] = company.country_id.vat_label
|
||||
return arch, view
|
||||
|
||||
@api.constrains('parent_id')
|
||||
|
||||
Reference in New Issue
Block a user