From 6f4efd45bb7ba2c72f81b092768b8a85d4978fc9 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 18 Apr 2014 11:05:20 +0200 Subject: [PATCH] [FIX] gamification: change scope of goal_obj variable bzr revid: mat@openerp.com-20140418090520-zq4r6s4g9qn78mvx --- addons/gamification/models/challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py index 295340a309b..081127d6bf0 100644 --- a/addons/gamification/models/challenge.py +++ b/addons/gamification/models/challenge.py @@ -376,6 +376,7 @@ class gamification_challenge(osv.Model): can be called after each change in the list of users or lines. :param list(int) ids: the list of challenge concerned""" + goal_obj = self.pool.get('gamification.goal') to_update = [] for challenge in self.browse(cr, uid, ids, context=context): (start_date, end_date) = start_end_date_for_period(challenge.period) @@ -390,7 +391,6 @@ class gamification_challenge(osv.Model): # FIXME: allow to restrict to a subset of users for user in challenge.user_ids: - goal_obj = self.pool.get('gamification.goal') domain = [('line_id', '=', line.id), ('user_id', '=', user.id)] if start_date: domain.append(('start_date', '=', start_date))