Coworking/coworking_coworker/views/res_partner_views.xml
2017-11-27 17:06:40 +01:00

75 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Form -->
<record id="view_form_res_partner" model="ir.ui.view">
<field name="name">>res.partner.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref ="base.view_partner_form" />
<field name="arch" type="xml">
<field name="is_company" position="before">
<field name="is_coworker" widget="radio" class="oe_edit_only" options="{'horizontal': true}"/>
</field>
<field name="parent_id" position="after">
<field name="coworker_type" attrs="{'invisible': [('is_coworker','!=', 'is_coworker')]}" />
<field name="contact_date" attrs="{'invisible': [('is_coworker','!=', 'is_coworker')]}"/>
</field>
<field name="email" position="after">
<field name="url" />
</field>
</field>
</record>
<!-- Tree -->
<record id="view_tree_res_partner" model="ir.ui.view">
<field name="name">res.partner.tree.inherit</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="company_name" />
<field name="full_contact_adress" />
</field>
<field name="phone" position="replace">
<field name="mobile" />
</field>
</field>
</record>
<!-- Search -->
<record id="view_search_res_partner" model="ir.ui.view">
<field name="name">res.partner.search.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref ="base.view_res_partner_filter" />
<field name="arch" type="xml">
<xpath expr="//search" position="inside">
<filter name="is_coworker" string="Coworker"
domain="[('is_coworker','!=',False)]" />
</xpath>
</field>
</record>
<!-- Kanban -->
<record id="view_kanban_res_partner" model="ir.ui.view">
<field name="name">res.partner.kanban.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref ="base.res_partner_kanban_view" />
<field name="arch" type="xml">
<xpath expr='//kanban/templates/t/div/div[3]/ul' position="before">
<field name="full_contact_adress" />
<div t-if="!record.full_contact_adress.raw_value"
style="margin: 0px; padding:3px 3px 10px 3px; color:#F77171; background-color: #FFF3F3;">
</div>
</xpath>
</field>
</record>
</odoo>