diff --git a/addons/gamification/goal.py b/addons/gamification/goal.py index 55f366c8ff9..4c61f658e42 100644 --- a/addons/gamification/goal.py +++ b/addons/gamification/goal.py @@ -196,7 +196,7 @@ class gamification_goal(osv.Model): } _order = 'create_date desc, end_date desc, type_id, id' - def _check_remind_delay(self, goal, context=None): + def _check_remind_delay(self, cr, uid, goal, context=None): """Verify if a goal has not been updated for some time and send a reminder message of needed. @@ -231,7 +231,7 @@ class gamification_goal(osv.Model): continue if goal.type_id.computation_mode == 'manually': - towrite.update(self._check_remind_delay(goal, context)) + towrite.update(self._check_remind_delay(cr, uid, goal, context)) elif goal.type_id.computation_mode == 'python': # execute the chosen method diff --git a/addons/gamification/plan.py b/addons/gamification/plan.py index 0e5fc63f689..cb9574fdf6b 100644 --- a/addons/gamification/plan.py +++ b/addons/gamification/plan.py @@ -320,7 +320,6 @@ class gamification_goal_plan(osv.Model): def quick_update(self, cr, uid, plan_id, context=None): """Update all the goals of a plan, no generation of new goals""" if not context: context = {} - plan = self.browse(cr, uid, plan_id, context=context) goal_ids = self.pool.get('gamification.goal').search(cr, uid, [('plan_id', '=', plan_id)], context=context) self.pool.get('gamification.goal').update(cr, uid, goal_ids, context=context) return True @@ -544,7 +543,6 @@ class gamification_goal_plan(osv.Model): """ context = context or {} - goal_obj = self.pool.get('gamification.goal') # template_env = TemplateHelper() temp_obj = self.pool.get('email.template') ctx = context.copy()