forked from Yaltik/golem
Revert "[TYPO]No need of api.one decorator for api.depends"
This reverts commit 5912fb0af3
.
This commit is contained in:
parent
5912fb0af3
commit
5d7077efc3
@ -86,6 +86,7 @@ class GolemFamily(models.Model):
|
|||||||
note = fields.Text('Note')
|
note = fields.Text('Note')
|
||||||
count = fields.Integer('Count', compute='_compute_count', store=True)
|
count = fields.Integer('Count', compute='_compute_count', store=True)
|
||||||
|
|
||||||
|
@api.one
|
||||||
@api.depends('member_ids')
|
@api.depends('member_ids')
|
||||||
def _compute_count(self):
|
def _compute_count(self):
|
||||||
self.count = len(self.member_ids)
|
self.count = len(self.member_ids)
|
||||||
|
@ -32,6 +32,7 @@ class GolemMember(models.Model):
|
|||||||
is_minor = fields.Boolean('Is minor?', compute='_compute_is_minor',
|
is_minor = fields.Boolean('Is minor?', compute='_compute_is_minor',
|
||||||
store=True, default=False)
|
store=True, default=False)
|
||||||
|
|
||||||
|
@api.one
|
||||||
@api.depends('birthdate_date')
|
@api.depends('birthdate_date')
|
||||||
def _compute_is_minor(self):
|
def _compute_is_minor(self):
|
||||||
if (self.birthdate_date):
|
if (self.birthdate_date):
|
||||||
|
Loading…
Reference in New Issue
Block a user