Revert "[TYPO]No need of api.one decorator for api.depends"

This reverts commit 5912fb0af3.
This commit is contained in:
Fabien Bourgeois 2016-08-17 09:48:07 +02:00
parent 5912fb0af3
commit 5d7077efc3
2 changed files with 2 additions and 0 deletions

View File

@ -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)

View File

@ -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):