From 20dcea3be30497b4de1ea1bfe2a25f9a2ea8f14e Mon Sep 17 00:00:00 2001 From: Martin Geubelle Date: Mon, 29 Jun 2015 16:19:52 +0200 Subject: [PATCH] [FIX] hr_gamification: user_id not required Revert the modification from commit 8ae67f6a5412ccde126bf8c85849f33f387df198 ; it appears that the test of required field is done before the computation of the related field and that leads to a Validation Error. As the field employee_id is already required and the user_id is related to this field, the attribute required is redundant and unecessary. --- addons/hr_gamification/wizard/grant_badge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_gamification/wizard/grant_badge.py b/addons/hr_gamification/wizard/grant_badge.py index e6247a1cd8c..b4ab7abec8a 100644 --- a/addons/hr_gamification/wizard/grant_badge.py +++ b/addons/hr_gamification/wizard/grant_badge.py @@ -30,7 +30,7 @@ class hr_grant_badge_wizard(osv.TransientModel): 'employee_id': fields.many2one("hr.employee", string='Employee', required=True), 'user_id': fields.related("employee_id", "user_id", type="many2one", relation="res.users", - store=True, string='User', required=True) + store=True, string='User') } def action_grant_badge(self, cr, uid, ids, context=None):