Coworking/coworking_coworker/views/res_partner_views.xml
2017-11-27 18:33:13 +01:00

86 lines
2.9 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/li[4]' position="replace">
<field name="full_contact_adress" />
<li t-if="!record.full_contact_adress.raw_value"></li>
</xpath>
</field>
</record>
<!-- Calendar -->
<act_window id="contacts.action_contacts" name="Contacts"
res_model="res.partner" view_mode="calendar" />
<record id="view_calendar_res_partner" model="ir.ui.view">
<field name="name">res.partner.calendar.inherit</field>
<field name="model">res.partner</field>
<!-- <field name="inherit_id" ref ="base.view_partner_form" /> -->
<field name="arch" type="xml">
<calendar date_start="contact_date"
display="First contact : [name]" >
<field name="name" />
</calendar>
</field>
</record>
</odoo>