summaryrefslogtreecommitdiff
path: root/addons/hr_gamification/models
diff options
context:
space:
mode:
authorDavid Beguin <dbe@odoo.com>2019-10-31 16:21:30 +0000
committerThibault Delavallée <tde@odoo.com>2019-11-22 14:45:39 +0000
commitbe3f074a910a76275ebaa576dc57f9b72f5ad4ae (patch)
tree4eb6bf32e9cc05f0590cc2d2741dccdd373a0923 /addons/hr_gamification/models
parent6f0d36fa67c91d0bd70cf092bd1d41c615e1e8be (diff)
[REF] gamification, * : rename challenge.category into challenge.challenge_category
To ease grep in the code, especially that challenge is quite heavily used. Task ID : 1961053 PR #32594
Diffstat (limited to 'addons/hr_gamification/models')
-rw-r--r--addons/hr_gamification/models/hr_employee.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/hr_gamification/models/hr_employee.py b/addons/hr_gamification/models/hr_employee.py
index d36edd79d49..441c104c635 100644
--- a/addons/hr_gamification/models/hr_employee.py
+++ b/addons/hr_gamification/models/hr_employee.py
@@ -18,12 +18,12 @@ class HrEmployeeBase(models.AbstractModel):
'gamification.badge.user', 'employee_id',
help="Badges directly linked to the employee")
- @api.depends('user_id.goal_ids.challenge_id.category')
+ @api.depends('user_id.goal_ids.challenge_id.challenge_category')
def _compute_employee_goals(self):
for employee in self:
employee.goal_ids = self.env['gamification.goal'].search([
('user_id', '=', employee.user_id.id),
- ('challenge_id.category', '=', 'hr'),
+ ('challenge_id.challenge_category', '=', 'hr'),
])
@api.depends('direct_badge_ids', 'user_id.badge_ids.employee_id')