Remove coworker_count
This commit is contained in:
parent
affa853857
commit
2411fdb93c
@ -10,10 +10,6 @@ class ResPartner(models.Model):
|
|||||||
_inherit = 'res.partner'
|
_inherit = 'res.partner'
|
||||||
|
|
||||||
is_coworker = fields.Boolean('Coworker', default=False)
|
is_coworker = fields.Boolean('Coworker', default=False)
|
||||||
coworker_count = fields.Integer('Number of coworker',
|
|
||||||
compute='_compute_coworker_count')
|
|
||||||
|
|
||||||
|
|
||||||
company_ids = fields.One2many(
|
company_ids = fields.One2many(
|
||||||
string="Company",
|
string="Company",
|
||||||
comodel_name="res.partner",
|
comodel_name="res.partner",
|
||||||
@ -31,12 +27,6 @@ class ResPartner(models.Model):
|
|||||||
|
|
||||||
full_contact_adress = fields.Char(compute='_compute_full_contact_adress')
|
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')
|
@api.depends('street', 'zip', 'city')
|
||||||
def _compute_full_contact_adress(self):
|
def _compute_full_contact_adress(self):
|
||||||
"""Concatènation de l'adresse si les chanps street, czip et city sont renseignés"""
|
"""Concatènation de l'adresse si les chanps street, czip et city sont renseignés"""
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<field name="full_contact_adress" />
|
<field name="full_contact_adress" />
|
||||||
</field>
|
</field>
|
||||||
<field name="phone" position="replace">
|
<field name="phone" position="replace">
|
||||||
<field name="mobile" />
|
<field name="mobile" />
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@ -44,8 +44,7 @@
|
|||||||
<search position="inside">
|
<search position="inside">
|
||||||
<filter name="is_coworker" string="Coworker"
|
<filter name="is_coworker" string="Coworker"
|
||||||
domain="[('is_coworker','=',True)]" />
|
domain="[('is_coworker','=',True)]" />
|
||||||
<separator />
|
<separator />
|
||||||
|
|
||||||
<filter name="group_month" string="Month"
|
<filter name="group_month" string="Month"
|
||||||
context="{'group_by': 'contact_date:month'}" />
|
context="{'group_by': 'contact_date:month'}" />
|
||||||
<filter name="group_year" string="Year"
|
<filter name="group_year" string="Year"
|
||||||
@ -109,7 +108,6 @@
|
|||||||
<field name="is_coworker" type="col" />
|
<field name="is_coworker" type="col" />
|
||||||
<field name="user_id" />
|
<field name="user_id" />
|
||||||
<field name="contact_date" interval="week" />
|
<field name="contact_date" interval="week" />
|
||||||
|
|
||||||
</pivot>
|
</pivot>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user