diff --git a/addons/gamification/models/goal.py b/addons/gamification/models/goal.py index b4a47a0d07a..904e6fafa36 100644 --- a/addons/gamification/models/goal.py +++ b/addons/gamification/models/goal.py @@ -349,8 +349,8 @@ class gamification_goal(osv.Model): goal = all_goals[goal_id] # check goal target reached - if (goal.definition_condition == 'higher' and value.get('current', goal.current) >= goal.target_goal) \ - or (goal.definition_condition == 'lower' and value.get('current', goal.current) <= goal.target_goal): + if (goal.definition_id.condition == 'higher' and value.get('current', goal.current) >= goal.target_goal) \ + or (goal.definition_id.condition == 'lower' and value.get('current', goal.current) <= goal.target_goal): value['state'] = 'reached' # check goal failure