Skip to content
Snippets Groups Projects
Commit 7888a3c4 authored by aliya's avatar aliya
Browse files

[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#99124

Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
parent f424d0c3
Branches
Tags
No related merge requests found
......@@ -38,7 +38,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': ['|', '&amp;', ('country_code', '!=', 'IN'), ('type', '!=', 'cash'), '&amp;', ('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>
......
<?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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment