[FIX] l10n_in: hide l10n_in fields for other l10ns
`l10n_in_gstin_partner_id` should be hidden on the journal form for non-Indian companies. It's probably also a good idea to hide `l10n_in_tin`in the country state form whenever the state added is not in India. vat field on `res.company` should be renamed to GSTIN only when the company country is India. task-2765567 closes odoo/odoo#100542 X-original-commit: 7888a3c43e01c4578b51fc200c7c1706fffbb330 Signed-off-by: William André (wan) <wan@odoo.com> Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
This commit is contained in:
@@ -39,7 +39,6 @@ Sheet, now only Vertical format has been permitted Which is Supported By Odoo.
|
||||
'views/product_template_view.xml',
|
||||
'views/port_code_views.xml',
|
||||
'views/report_invoice.xml',
|
||||
'views/res_company_view.xml',
|
||||
'views/res_country_state_view.xml',
|
||||
'views/res_partner_views.xml',
|
||||
'views/account_tax_views.xml',
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<attribute name="attrs">{'invisible': ['|', '&', ('country_code', '!=', 'IN'), ('type', '!=', 'cash'), '&', ('country_code', '=', 'IN'), ('type', 'not in', ['bank', 'cash', 'sale', 'purchase'])]}</attribute>
|
||||
</field>
|
||||
<field name="company_id" position="after">
|
||||
<field name="l10n_in_gstin_partner_id" context="{'show_vat':True}" options='{"no_create": True,"always_reload": True}'/>
|
||||
<field name="l10n_in_gstin_partner_id" context="{'show_vat':True}" options='{"no_create": True,"always_reload": True}' attrs="{'invisible': [('country_code', '!=', 'IN')]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="l10n_in_view_company_form" model="ir.ui.view">
|
||||
<field name="name">l10n.in.view.company.form</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="priority" eval="100"/>
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='vat']" position="attributes">
|
||||
<attribute name="string" attrs="{'invisible': [('country_code', '!=', 'IN')]}">GSTIN</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="base.view_country_state_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="code" position="after">
|
||||
<field name="l10n_in_tin"/>
|
||||
<field name="l10n_in_tin" attrs="{'invisible': [('country_id', '!=', %(base.in)d)]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user