Merge branch 'V4' of fabien/michel_coworking into V4

This commit is contained in:
michel 2017-11-28 11:29:52 +00:00 committed by Gitea
commit 2ce2c58a82
4 changed files with 23 additions and 22 deletions

View File

@ -25,5 +25,5 @@
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['base', 'contacts']
'depends': ['contacts']
}

View File

@ -25,11 +25,7 @@
'license': 'AGPL-3',
'application': False,
'installable': True,
'data': ['views/res_partner_views.xml',
# 'views/res_partner_menu.xml'
# 'security/ir.model.access.csv',
# 'views/coworker_views.xml'
],
'data': ['views/res_partner_views.xml'],
'depends': ['coworking_base']
}

View File

@ -9,7 +9,7 @@ class ResPartner(models.Model):
""" Coworker model """
_inherit = 'res.partner'
is_coworker = fields.Selection([('is_coworker', 'Coworker')])
is_coworker = fields.Boolean('Coworker', default=False)
# coworker_count = fields.Integer('Number of coworker',
# compute='_compute_coworker_count')

View File

@ -7,16 +7,13 @@
<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 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="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>
@ -59,22 +56,30 @@
<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="city" position="after">
<field name="full_contact_adress" />
<li t-if="!record.full_contact_adress.raw_value"></li>
</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="calendar,graph" />
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"
<calendar date_start="contact_date" mode="month"
display="First contact : [name]" >
<field name="name" />
</calendar>
@ -93,7 +98,7 @@
</field>
</record>
<record id="view_pivot_res_partner" model="ir.ui.view">
<!-- <record id="view_pivot_res_partner" model="ir.ui.view">
<field name="arch" type="xml">
<pivot>
<field name="is_coworker" type="col" />
@ -103,5 +108,5 @@
</pivot>
</field>
</record>
-->
</odoo>