From f305b9e95b2f6935b2e861a399ecded77e56be10 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 7 Oct 2014 10:24:57 +0200 Subject: [PATCH] [FIX] gamification: on delete badge user, cascade Otherwise, this is no more possible to delete users having badges --- addons/gamification/models/badge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/gamification/models/badge.py b/addons/gamification/models/badge.py index 1d879393ed2..28aa835878f 100644 --- a/addons/gamification/models/badge.py +++ b/addons/gamification/models/badge.py @@ -37,7 +37,7 @@ class gamification_badge_user(osv.Model): _order = "create_date desc" _columns = { - 'user_id': fields.many2one('res.users', string="User", required=True), + 'user_id': fields.many2one('res.users', string="User", required=True, ondelete="cascade"), 'sender_id': fields.many2one('res.users', string="Sender", help="The user who has send the badge"), 'badge_id': fields.many2one('gamification.badge', string='Badge', required=True), 'comment': fields.text('Comment'),