/
This commit is contained in:
parent
a74caf97ca
commit
ccb82a0c72
@ -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 """
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user