This commit is contained in:
michel 2017-11-20 15:52:07 +01:00
parent a74caf97ca
commit ccb82a0c72
2 changed files with 9 additions and 5 deletions

View File

@ -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 """

View File

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