forked from Yaltik/golem
[TYPO]No need of api.one decorator for api.depends
This commit is contained in:
parent
0ec6068829
commit
5912fb0af3
@ -86,7 +86,6 @@ 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,7 +32,6 @@ 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