Remove coworker_count

This commit is contained in:
michel 2017-11-28 15:02:39 +01:00
parent affa853857
commit 2411fdb93c
2 changed files with 2 additions and 14 deletions

View File

@ -10,10 +10,6 @@ class ResPartner(models.Model):
_inherit = 'res.partner'
is_coworker = fields.Boolean('Coworker', default=False)
coworker_count = fields.Integer('Number of coworker',
compute='_compute_coworker_count')
company_ids = fields.One2many(
string="Company",
comodel_name="res.partner",
@ -31,12 +27,6 @@ class ResPartner(models.Model):
full_contact_adress = fields.Char(compute='_compute_full_contact_adress')
@api.depends('is_coworker')
def _compute_coworker_count(self):
""" Computes number of coworker """
for coworker in self:
coworker.coworker_count = len(coworker.coworker_type)
@api.depends('street', 'zip', 'city')
def _compute_full_contact_adress(self):
"""Concatènation de l'adresse si les chanps street, czip et city sont renseignés"""

View File

@ -30,7 +30,7 @@
<field name="full_contact_adress" />
</field>
<field name="phone" position="replace">
<field name="mobile" />
<field name="mobile" />
</field>
</field>
</record>
@ -44,8 +44,7 @@
<search position="inside">
<filter name="is_coworker" string="Coworker"
domain="[('is_coworker','=',True)]" />
<separator />
<separator />
<filter name="group_month" string="Month"
context="{'group_by': 'contact_date:month'}" />
<filter name="group_year" string="Year"
@ -109,7 +108,6 @@
<field name="is_coworker" type="col" />
<field name="user_id" />
<field name="contact_date" interval="week" />
</pivot>
</field>
</record>