[FIX] base_vat: use countries VAT label

The module changes VAT label from 'Tax ID' to a fixed value ('VAT'), but there is no reason for it, current use of country defined VAT label works just fine

Task No: (2626863)[https://www.odoo.com/web#id=2626863&cids=1&menu_id=4722&action=4043&model=project.task&view_type=form]

closes odoo/odoo#86445

Related: odoo/upgrade#3376
Signed-off-by: Laurent Smet <las@odoo.com>
This commit is contained in:
Pouya Malekinejad
2022-04-27 14:28:57 +02:00
parent ff15e4dc75
commit 149c067a10
4 changed files with 0 additions and 33 deletions
-2
View File
@@ -36,8 +36,6 @@ only the country code will be validated.
""",
'depends': ['account'],
'data': [
'views/res_company_views.xml',
'views/res_partner_views.xml',
'views/res_config_settings_views.xml',
],
'license': 'LGPL-3',
-2
View File
@@ -83,8 +83,6 @@ _region_specific_vat_codes = {
class ResPartner(models.Model):
_inherit = 'res.partner'
vat = fields.Char(string="VAT/Tax ID")
def _split_vat(self, vat):
vat_country, vat_number = vat[:2].lower(), vat[2:].replace(' ', '')
return vat_country, vat_number
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="company_form_vat" model="ir.ui.view">
<field name="name">res.company.form.vat.inherit</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="attributes">
<attribute name="string">VAT</attribute>
</xpath>
</field>
</record>
</odoo>
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.vat.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="attributes">
<attribute name="string">VAT</attribute>
</xpath>
<xpath expr="//span[hasclass('o_vat_label')]" position="replace">
<span class="o_vat_label">VAT</span>
</xpath>
</field>
</record>
</odoo>