relation_ids

This commit is contained in:
michel 2017-11-20 15:07:59 +01:00
parent 34b0f1f385
commit c2f395a2e6
2 changed files with 4 additions and 3 deletions

View File

@ -15,8 +15,8 @@ class Coworker(models.Model):
events_coworker_count = fields.Integer('Number of event have participe', events_coworker_count = fields.Integer('Number of event have participe',
compute='_compute_events_coworker_count') compute='_compute_events_coworker_count')
#Relation fields #Relation fields
coworker_relation_ids = fields.One2many( relation_ids = fields.One2many(
'coworking.relation', 'relation', 'coworker1') 'coworking.relation', 'relation')
@api.depends('event_ids') @api.depends('event_ids')
def _compute_events_coworker_count(self): def _compute_events_coworker_count(self):

View File

@ -11,7 +11,8 @@
<notebook position="inside"> <notebook position="inside">
<page string="Relation" name="Relation"> <page string="Relation" name="Relation">
<group name="relation"> <group name="relation">
<field name="coworker_relation_ids" context="{'default_relation_id': active_id}" /> <field name="relation_ids" context="{'relation_id': active_id}" />
</group> </group>
</page> </page>
</notebook> </notebook>