From 950cf14b9ee40ed3710f555d0aa4993cf6c964dd Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 4 Nov 2014 11:49:31 +0100 Subject: [PATCH] [FIX] gamification: call _send_badge on right object --- addons/gamification/wizard/grant_badge.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/gamification/wizard/grant_badge.py b/addons/gamification/wizard/grant_badge.py index 44f739fff4e..513a1526c8b 100644 --- a/addons/gamification/wizard/grant_badge.py +++ b/addons/gamification/wizard/grant_badge.py @@ -36,7 +36,6 @@ class grant_badge_wizard(osv.TransientModel): def action_grant_badge(self, cr, uid, ids, context=None): """Wizard action for sending a badge to a chosen user""" - badge_obj = self.pool.get('gamification.badge') badge_user_obj = self.pool.get('gamification.badge.user') for wiz in self.browse(cr, uid, ids, context=context): @@ -51,6 +50,6 @@ class grant_badge_wizard(osv.TransientModel): 'comment': wiz.comment, } badge_user = badge_user_obj.create(cr, uid, values, context=context) - result = badge_obj._send_badge(cr, uid, badge_user, context=context) + result = badge_user_obj._send_badge(cr, uid, badge_user, context=context) return result