diff --git a/coworking_relation/models/coworker.py b/coworking_relation/models/coworker.py index b4f485b..9b59247 100644 --- a/coworking_relation/models/coworker.py +++ b/coworking_relation/models/coworker.py @@ -16,12 +16,16 @@ class Coworker(models.Model): compute='_compute_events_coworker_count') #Relation fields - relation_ids = fields.One2many( + coworker1_relation_ids = fields.One2many( string="Relation", comodel_name="coworking.relation", - inverse_name="relation", + inverse_name="coworker1" + ) + coworker2_relation_ids = fields.One2many( + string="Relation", + comodel_name="coworking.relation", + inverse_name="coworker2" ) - @api.depends('event_ids') def _compute_events_coworker_count(self): """ Computes number of event coworker """ diff --git a/coworking_relation/views/coworker_views.xml b/coworking_relation/views/coworker_views.xml index c0dd84f..1ef9ef5 100644 --- a/coworking_relation/views/coworker_views.xml +++ b/coworking_relation/views/coworker_views.xml @@ -11,8 +11,8 @@ - - + +