mirror of
https://gitlab.com/flectra-community/partner-contact.git
synced 2024-12-23 21:01:48 +00:00
82 lines
3.6 KiB
XML
82 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!-- Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
|
|
Copyright 2018 Eficent Business and IT Consulting Services, S.L. - Jordi Ballester
|
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
|
|
<flectra>
|
|
<record model="ir.ui.view" id="view_partner_form_industry">
|
|
<field name="name">Partner form with industry</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form" />
|
|
<field name="arch" type="xml">
|
|
<field name="industry_id" position="after">
|
|
<field name="show_partner_industry_for_person" invisible="1" />
|
|
<field
|
|
name="secondary_industry_ids"
|
|
widget="many2many_tags"
|
|
invisible="is_company == False and show_partner_industry_for_person == False"
|
|
/>
|
|
</field>
|
|
<field name="industry_id" position="attributes">
|
|
<attribute
|
|
name="invisible"
|
|
>is_company == False and show_partner_industry_for_person == False</attribute>
|
|
</field>
|
|
<xpath
|
|
expr="//field[@name='child_ids']/form//field[@name='title']"
|
|
position="after"
|
|
>
|
|
<field name="is_company" invisible="1" />
|
|
<field name="show_partner_industry_for_person" invisible="1" />
|
|
<field
|
|
name="industry_id"
|
|
placeholder="Sector"
|
|
options='{"no_open": True}'
|
|
invisible="is_company == False and show_partner_industry_for_person == False"
|
|
/>
|
|
<field
|
|
name="secondary_industry_ids"
|
|
widget="many2many_tags"
|
|
invisible="is_company == False and show_partner_industry_for_person == False"
|
|
/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="view_partner_tree_industry">
|
|
<field name="name">Partner tree with industry</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_tree" />
|
|
<field name="arch" type="xml">
|
|
<field name="email" position="after">
|
|
<field
|
|
name="industry_id"
|
|
invisible="is_company == False and show_partner_industry_for_person == False"
|
|
/>
|
|
<field name="show_partner_industry_for_person" column_invisible="1" />
|
|
</field>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="view_res_partner_filter_industry">
|
|
<field name="name">Partner search with industry</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="industry_id"
|
|
string="Industry"
|
|
filter_domain="['|',('industry_id','ilike',self),
|
|
('secondary_industry_ids.name','ilike',self)]"
|
|
/>
|
|
</field>
|
|
<filter name="salesperson" position="after">
|
|
<filter
|
|
name="industry"
|
|
string="Industry"
|
|
domain="[('is_company','=', True)]"
|
|
context="{'group_by': 'industry_id'}"
|
|
/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
</flectra>
|