Files
odoo_source/addons/l10n_ph/views/res_partner_views.xml
T
Ricardo Gomes Rodrigues (rigr) 6b396c84e5 [IMP] account,l10n_*: clean country-specific fields from views
Many country-specific fields were displayed while a company with another country was selected (in case of a multi-company environment).

These country-specific fields are now visible only if one of the selected companies with said country is selected.

closes odoo/odoo#106221

Related: odoo/enterprise#34226
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-12-09 11:48:42 +01:00

17 lines
1003 B
XML

<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.form.inherit.l10n_ph_bir</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="after">
<field name="branch_code" attrs="{'invisible': [('fiscal_country_codes', 'not ilike', 'PH')]}"/>
<field name="first_name" attrs="{'invisible': ['|', ('fiscal_country_codes', 'not ilike', 'PH'), ('is_company','=', True)]}"/>
<field name="middle_name" attrs="{'invisible': ['|', ('fiscal_country_codes', 'not ilike', 'PH'), ('is_company','=', True)]}"/>
<field name="last_name" attrs="{'invisible': ['|', ('fiscal_country_codes', 'not ilike', 'PH'), ('is_company','=', True)]}"/>
</xpath>
</field>
</record>
</odoo>