[ADD] add goal plan manager

bzr revid: mat@openerp.com-20130306165659-ksi573z3jlk4ijve
This commit is contained in:
Martin Trigaux
2013-03-06 17:56:59 +01:00
parent 21c550cdc4
commit e34ce46d11
2 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -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):
+3 -1
View File
@@ -26,7 +26,8 @@
<tree string="Goal types" colors="blue:state == 'draft';grey:state == 'done'">
<field name="name"/>
<field name="period"/>
<field name="state" invisible="1"/>
<field name="manager_id"/>
<field name="state"/>
</tree>
</field>
</record>
@@ -67,6 +68,7 @@
<group>
<group colspan="4">
<field name="manager_id"/>
<field name="start_date" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="period" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="remind_update_delay"/>