graph et pivot add view pivot

This commit is contained in:
michel 2017-11-28 11:20:06 +01:00
parent 83c684ff7d
commit 7d52c03561
2 changed files with 20 additions and 9 deletions

View File

@ -31,12 +31,12 @@ 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 res_partner in self:
# if res_partner.partner_id is self.is_coworker():
# self.coworker_count = len(res_partner.partner_id)
@api.depends('is_coworker')
def _compute_coworker_count(self):
""" Computes number of coworker """
for res_partner in self:
if self.is_coworker():
self.coworker_count = len(self.is_coworker)
@api.depends('street', 'zip', 'city')
def _compute_full_contact_adress(self):

View File

@ -93,4 +93,15 @@
</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>