mirror of
https://gitlab.com/flectra-community/partner-contact.git
synced 2024-12-24 05:11:47 +00:00
91 lines
3.6 KiB
XML
91 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<flectra>
|
|
<record model="ir.ui.view" id="view_partner_form_nuts">
|
|
<field name="name">Partner form with NUTS</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//sheet/group//field[@name='country_id']/.." position="after">
|
|
<field name="allowed_nut_ids" invisible="1" />
|
|
<field
|
|
name="nuts1_id"
|
|
context="{'default_country_id': country_id, 'default_level': 1}"
|
|
/>
|
|
<field
|
|
name="nuts2_id"
|
|
context="{'default_country_id': country_id, 'default_level': 2, 'default_parent_id': nuts1_id}"
|
|
/>
|
|
<field
|
|
name="nuts3_id"
|
|
context="{'default_country_id': country_id, 'default_level': 3, 'default_parent_id': nuts2_id}"
|
|
/>
|
|
<field
|
|
name="nuts4_id"
|
|
context="{'default_country_id': country_id, 'default_level': 4, 'default_parent_id': nuts3_id}"
|
|
/>
|
|
</xpath>
|
|
<xpath
|
|
expr="//field[@name='child_ids']/form//field[@name='country_id']/.."
|
|
position="after"
|
|
>
|
|
<field name="allowed_nut_ids" invisible="1" />
|
|
<field
|
|
name="nuts1_id"
|
|
context="{'default_country_id': country_id, 'default_level': 1}"
|
|
/>
|
|
<field
|
|
name="nuts2_id"
|
|
context="{'default_country_id': country_id, 'default_level': 2, 'default_parent_id': nuts1_id}"
|
|
/>
|
|
<field
|
|
name="nuts3_id"
|
|
context="{'default_country_id': country_id, 'default_level': 3, 'default_parent_id': nuts2_id}"
|
|
/>
|
|
<field
|
|
name="nuts4_id"
|
|
context="{'default_country_id': country_id, 'default_level': 4, 'default_parent_id': nuts3_id}"
|
|
/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="view_res_partner_filter_nuts">
|
|
<field name="name">Partner search with NUTS</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_res_partner_filter" />
|
|
<field name="arch" type="xml">
|
|
<field name="category_id" position="after">
|
|
<field name="nuts1_id" />
|
|
<field name="nuts2_id" />
|
|
<field name="nuts3_id" />
|
|
<field name="nuts4_id" />
|
|
</field>
|
|
<filter name="salesperson" position="after">
|
|
<filter
|
|
name="nuts_l1"
|
|
string="NUTS L1"
|
|
domain="[]"
|
|
context="{'group_by': 'nuts1_id'}"
|
|
/>
|
|
<filter
|
|
name="nuts_l2"
|
|
string="NUTS L2"
|
|
domain="[]"
|
|
context="{'group_by': 'nuts2_id'}"
|
|
/>
|
|
<filter
|
|
name="nuts_l3"
|
|
string="NUTS L3"
|
|
domain="[]"
|
|
context="{'group_by': 'nuts3_id'}"
|
|
/>
|
|
<filter
|
|
name="nuts_l4"
|
|
string="NUTS L4"
|
|
domain="[]"
|
|
context="{'group_by': 'nuts4_id'}"
|
|
/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
</flectra>
|