[IMP]Activity registration used place computing : as used by external module, should not be private method
This commit is contained in:
parent
c4d8c5f334
commit
a955633375
@ -38,12 +38,12 @@ class GolemActivity(models.Model):
|
|||||||
activity_registration_ids = fields.One2many('golem.activity.registration',
|
activity_registration_ids = fields.One2many('golem.activity.registration',
|
||||||
'activity_id', 'Members',
|
'activity_id', 'Members',
|
||||||
index=True)
|
index=True)
|
||||||
places_used = fields.Integer('Places used', compute='_compute_places_used',
|
places_used = fields.Integer('Places used', compute='compute_places_used',
|
||||||
store=True)
|
store=True)
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
@api.depends('activity_registration_ids')
|
@api.depends('activity_registration_ids')
|
||||||
def _compute_places_used(self):
|
def compute_places_used(self):
|
||||||
""" Computes used places """
|
""" Computes used places """
|
||||||
for activity in self:
|
for activity in self:
|
||||||
activity.places_used = len(activity.activity_registration_ids)
|
activity.places_used = len(activity.activity_registration_ids)
|
||||||
|
Loading…
Reference in New Issue
Block a user