From 9b922d9858c80e43713eb3fa26e6582f69296702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 9 Apr 2014 17:26:29 +0200 Subject: [PATCH] [REVIEW] [CLEAN] gamification: reverted changes instead of the fix. bzr revid: tde@openerp.com-20140409152629-3div4vdfknjrtnb6 --- addons/gamification/models/badge.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/gamification/models/badge.py b/addons/gamification/models/badge.py index cf8b1fc7ca9..102892a8c2a 100644 --- a/addons/gamification/models/badge.py +++ b/addons/gamification/models/badge.py @@ -34,7 +34,6 @@ class gamification_badge_user(osv.Model): _name = 'gamification.badge.user' _description = 'Gamification user badge' - _inherit = ['mail.thread'] _order = "create_date desc" _rec_name = "badge_name" @@ -59,6 +58,7 @@ class gamification_badge_user(osv.Model): """ res = True temp_obj = self.pool.get('email.template') + user_obj = self.pool.get('res.users') template_id = self.pool['ir.model.data'].get_object(cr, uid, 'gamification', 'email_template_badge_received', context) for badge_user in self.browse(cr, uid, ids, context=context): body_html = temp_obj.render_template(cr, uid, template_id.body_html, 'gamification.badge.user', badge_user.id, context=context) @@ -66,9 +66,8 @@ class gamification_badge_user(osv.Model): return res def create(self, cr, uid, vals, context=None): - create_context = dict(context, mail_create_nolog=True) self.pool.get('gamification.badge').check_granting(cr, uid, badge_id=vals.get('badge_id'), context=context) - return super(gamification_badge_user, self).create(cr, uid, vals, context=create_context) + return super(gamification_badge_user, self).create(cr, uid, vals, context=context) class gamification_badge(osv.Model):