diff --git a/addons/gamification/data/badge.xml b/addons/gamification/data/badge.xml
index 5a390be9deb..33d02bf016e 100644
--- a/addons/gamification/data/badge.xml
+++ b/addons/gamification/data/badge.xml
@@ -23,7 +23,6 @@
-
Brilliant
With your brilliant ideas, you are an inspiration to others.
@@ -32,6 +31,16 @@
2
+
+
+
+ Badge Granted
+ res.users
+
+
+ Badge Granted
+
+
diff --git a/addons/gamification/models/badge.py b/addons/gamification/models/badge.py
index 4ecc116000c..d8a3ef18840 100644
--- a/addons/gamification/models/badge.py
+++ b/addons/gamification/models/badge.py
@@ -63,7 +63,12 @@ class gamification_badge_user(osv.Model):
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)
- res = user_obj.message_post(cr, uid, badge_user.user_id.id, body=body_html, partner_ids=[badge_user.user_id.partner_id.id], context=context)
+ res = user_obj.message_post(
+ cr, uid, badge_user.user_id.id,
+ body=body_html,
+ subtype='gamification.mt_badge_granted',
+ partner_ids=[badge_user.user_id.partner_id.id],
+ context=context)
return res
def create(self, cr, uid, vals, context=None):