Browse Source

pre-commit update

14.0
OCA-git-bot 5 years ago
committed by newtratip
parent
commit
f9b297c691
  1. 65
      partner_contact_job_position/views/res_partner_job_position_view.xml
  2. 78
      partner_contact_job_position/views/res_partner_view.xml

65
partner_contact_job_position/views/res_partner_job_position_view.xml

@ -1,36 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="res_partner_job_position_action" model="ir.actions.act_window">
<field name="name">Job Positions</field>
<field name="res_model">res.partner.job_position</field>
<field name="view_mode">tree</field>
</record>
<record id="res_partner_job_position_tree_view" model="ir.ui.view">
<field name="name">Job position tree</field>
<field name="model">res.partner.job_position</field>
<field name="arch" type="xml">
<tree string="Job positions" editable="top">
<field name="name"/>
</tree>
</field>
</record>
<record id="res_partner_job_position_form_view" model="ir.ui.view">
<field name="name">Job position form</field>
<field name="model">res.partner.job_position</field>
<field name="arch" type="xml">
<form string="Job positions">
<group>
<field name="name"/>
</group>
</form>
</field>
</record>
<menuitem action="res_partner_job_position_action"
id="menu_res_partner_job_position"
parent="contacts.res_partner_menu_config"/>
<record id="res_partner_job_position_action" model="ir.actions.act_window">
<field name="name">Job Positions</field>
<field name="res_model">res.partner.job_position</field>
<field name="view_mode">tree</field>
</record>
<record id="res_partner_job_position_tree_view" model="ir.ui.view">
<field name="name">Job position tree</field>
<field name="model">res.partner.job_position</field>
<field name="arch" type="xml">
<tree string="Job positions" editable="top">
<field name="name" />
</tree>
</field>
</record>
<record id="res_partner_job_position_form_view" model="ir.ui.view">
<field name="name">Job position form</field>
<field name="model">res.partner.job_position</field>
<field name="arch" type="xml">
<form string="Job positions">
<group>
<field name="name" />
</group>
</form>
</field>
</record>
<menuitem
action="res_partner_job_position_action"
id="menu_res_partner_job_position"
parent="contacts.res_partner_menu_config"
/>
</odoo>

78
partner_contact_job_position/views/res_partner_view.xml

@ -1,40 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="ir.ui.view" id="view_partner_form_job_position">
<field name="name">Partner form with job position</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="function" position="before">
<field name="job_position_id"
attrs="{'invisible': [('is_company','=', True)]}"
options='{"no_open": True}'/>
<record model="ir.ui.view" id="view_partner_form_job_position">
<field name="name">Partner form with job position</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<field name="function" position="before">
<field
name="job_position_id"
attrs="{'invisible': [('is_company','=', True)]}"
options='{"no_open": True}'
/>
</field>
<xpath
expr="//field[@name='child_ids']/form//field[@name='function']"
position="before"
>
<field name="is_company" invisible="True" />
<field
name="job_position_id"
attrs="{'invisible': [('is_company','=', True)]}"
options='{"no_open": True}'
/>
</xpath>
</field>
<xpath expr="//field[@name='child_ids']/form//field[@name='function']"
position="before">
<field name="is_company" invisible="True"/>
<field name="job_position_id"
attrs="{'invisible': [('is_company','=', True)]}"
options='{"no_open": True}'/>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_res_partner_filter_job_position">
<field name="name">Partner search with job position</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="job_position_id"/>
</record>
<record model="ir.ui.view" id="view_res_partner_filter_job_position">
<field name="name">Partner search with job position</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="job_position_id" />
</field>
<filter name="salesperson" position="after">
<filter
string="Job position"
name="job_position_filter"
domain="[('is_company','!=', True)]"
context="{'group_by': 'job_position_id'}"
/>
</filter>
</field>
<filter name="salesperson" position="after">
<filter string="Job position"
name="job_position_filter" domain="[('is_company','!=', True)]"
context="{'group_by': 'job_position_id'}"/>
</filter>
</field>
</record>
</record>
</odoo>
Loading…
Cancel
Save