From 34b0f1f3853920f276b52cd213d21ebc3e58146f Mon Sep 17 00:00:00 2001 From: michel Date: Mon, 20 Nov 2017 14:48:26 +0100 Subject: [PATCH] relation ids --- coworking_relation/models/coworker.py | 3 +++ coworking_relation/views/coworker_views.xml | 9 +++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/coworking_relation/models/coworker.py b/coworking_relation/models/coworker.py index f556f3d..ba314a2 100644 --- a/coworking_relation/models/coworker.py +++ b/coworking_relation/models/coworker.py @@ -14,6 +14,9 @@ class Coworker(models.Model): events_coworker_count = fields.Integer('Number of event have participe', compute='_compute_events_coworker_count') +#Relation fields + coworker_relation_ids = fields.One2many( + 'coworking.relation', 'relation', 'coworker1') @api.depends('event_ids') def _compute_events_coworker_count(self): diff --git a/coworking_relation/views/coworker_views.xml b/coworking_relation/views/coworker_views.xml index 68f5668..c802e31 100644 --- a/coworking_relation/views/coworker_views.xml +++ b/coworking_relation/views/coworker_views.xml @@ -9,12 +9,9 @@ - - - - - + + +