[FIX] gamification: call _send_badge on right object
authorMartin Trigaux <mat@odoo.com>
Tue, 4 Nov 2014 10:49:31 +0000 (11:49 +0100)
committerMartin Trigaux <mat@odoo.com>
Tue, 4 Nov 2014 10:49:31 +0000 (11:49 +0100)
addons/gamification/wizard/grant_badge.py

index 44f739f..513a152 100644 (file)
@@ -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