From e34ce46d114456c90fd61a18bb531a5a7c7d2139 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 6 Mar 2013 17:56:59 +0100 Subject: [PATCH] [ADD] add goal plan manager bzr revid: mat@openerp.com-20130306165659-ksi573z3jlk4ijve --- addons/gamification/plan.py | 5 ++++- addons/gamification/plan_view.xml | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/gamification/plan.py b/addons/gamification/plan.py index 7a74e686c53..159fd295614 100644 --- a/addons/gamification/plan.py +++ b/addons/gamification/plan.py @@ -93,7 +93,9 @@ class gamification_goal_plan(osv.Model): 'name' : fields.char('Plan Name', required=True, translate=True), 'user_ids' : fields.many2many('res.users', string='Users', - help="list of users to which the goal will be set"), + help="List of users to which the goal will be set"), + 'manager_id' : fields.many2one('res.users', required=True, + string='Manager', help="The user that will be able to access the user goals and modify the plan."), 'planline_ids' : fields.one2many('gamification.goal.planline', 'plan_id', string='Planline', @@ -156,6 +158,7 @@ class gamification_goal_plan(osv.Model): 'report_message_frequency' : 'onchange', 'last_report_date' : fields.date.today, 'start_date' : fields.date.today, + 'manager_id' : lambda s, cr, uid, c: uid, } def _check_nonzero_planline(self, cr, uid, ids, context=None): diff --git a/addons/gamification/plan_view.xml b/addons/gamification/plan_view.xml index 6fe8ce30a34..84ff98d216b 100644 --- a/addons/gamification/plan_view.xml +++ b/addons/gamification/plan_view.xml @@ -26,7 +26,8 @@ - + + @@ -67,6 +68,7 @@ +