Coworking/coworking_coworker/views/res_partner_views.xml

113 lines
3.7 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="type" position="after">
<field name="is_coworker" />
<field name="coworker_type"
attrs="{'invisible': [('is_coworker','=', False)]}" />
<field name="contact_date"
attrs="{'invisible': [('is_coworker','=', False)]}"/>
</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">
<field name="city" position="after">
<field name="full_contact_adress" />
</field>
<xpath expr="//div[@class='oe_kanban_details']/ul/li[4]" position="replace">
<li><field name="full_contact_adress" /></li>
</xpath>
<xpath expr="//div[@class='oe_kanban_details']/ul/li[5]" position="attributes">
<attribute name="style">display: none;</attribute>
</xpath>
<xpath expr="//div[@class='oe_kanban_details']/ul/li[6]" position="attributes">
<attribute name="style">display: none;</attribute>
</xpath>
</field>
</record>
<!-- Calendar -->
<act_window id="contacts.action_contacts" name="Contacts"
res_model="res.partner" view_mode="kanban,form,calendar,graph" />
<record id="view_calendar_res_partner" model="ir.ui.view">
<field name="name">res.partner.calendar</field>
<field name="model">res.partner</field>
<field name="arch" type="xml">
<calendar date_start="contact_date" mode="month"
display="First contact : [name]" >
<field name="name" />
</calendar>
</field>
</record>
<!-- Graph -->
<record id="view_graph_res_partner" model="ir.ui.view">
<field name="name">res.partner.graph</field>
<field name="model">res.partner</field>
<field name="arch" type="xml">
<graph type="bar">
<field name="is_coworker" />
<field name="is_coworker" type="measure" />
</graph>
</field>
</record>
<!-- <record id="view_pivot_res_partner" model="ir.ui.view">
<field name="arch" type="xml">
<pivot>
<field name="is_coworker" type="col" />
<field name="user_id" />
<field name="date_deadline" interval="week" />
<field name="effort_estimate" type="measure" />
</pivot>
</field>
</record>
-->
</odoo>