You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
2.0 KiB
55 lines
2.0 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<record model="ir.ui.view" id="view_partner_form_department">
|
|
<field name="name">Partner form with department</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
|
<field name="arch" type="xml">
|
|
<field name="phone" position="before">
|
|
<field name="department"
|
|
placeholder="Department"
|
|
attrs="{'invisible': [('is_company','=', True)]}"
|
|
options='{"no_open": True}'/>
|
|
</field>
|
|
<xpath expr="//field[@name='child_ids']/form//field[@name='phone']" position="before">
|
|
<field name="department"
|
|
placeholder="Department"
|
|
attrs="{'invisible': [('is_company','=', True)]}"
|
|
options='{"no_open": True}'/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Uncomment this to add a new column to tree view
|
|
<record model="ir.ui.view" id="view_partner_tree_department">
|
|
<field name="name">Partner tree with department</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_tree"/>
|
|
<field name="arch" type="xml">
|
|
<field name="phone" position="before">
|
|
<field name="department"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
-->
|
|
|
|
<record model="ir.ui.view" id="view_res_partner_filter_department">
|
|
<field name="name">Partner search with department</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="department"/>
|
|
</field>
|
|
<filter string="Salesperson" position="after">
|
|
<filter string="Department"
|
|
domain="[('is_company', '=', False)]"
|
|
context="{'group_by': 'department'}"/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</openerp>
|