[IMP] gamification: remove unused variables, add missing ones

bzr revid: mat@openerp.com-20131216142352-2s6isuvobm6xyxa4
This commit is contained in:
Martin Trigaux 2013-12-16 15:23:52 +01:00
parent ae19a1609d
commit 8c3b6c0a3d
2 changed files with 2 additions and 4 deletions

View File

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

View File

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