/
This commit is contained in:
parent
a74caf97ca
commit
ccb82a0c72
@ -16,12 +16,16 @@ class Coworker(models.Model):
|
|||||||
compute='_compute_events_coworker_count')
|
compute='_compute_events_coworker_count')
|
||||||
#Relation fields
|
#Relation fields
|
||||||
|
|
||||||
relation_ids = fields.One2many(
|
coworker1_relation_ids = fields.One2many(
|
||||||
string="Relation",
|
string="Relation",
|
||||||
comodel_name="coworking.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')
|
@api.depends('event_ids')
|
||||||
def _compute_events_coworker_count(self):
|
def _compute_events_coworker_count(self):
|
||||||
""" Computes number of event coworker """
|
""" Computes number of event coworker """
|
||||||
|
@ -11,8 +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="relation_ids" context="{'relation_id': active_id}" />
|
<field name="coworker1_relation_ids" />
|
||||||
|
<field name="coworker2_relation_ids" />
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
|
Loading…
Reference in New Issue
Block a user