diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-02-15 14:32:34 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-02-15 14:32:34 +0100 |
| commit | 92c03ea75cd87381b09d01ac0dd7bafa922dfe9a (patch) | |
| tree | 1083bbf3c001f2155e7610b738a63dd0f2df4af6 /addons | |
| parent | ca712230e2b0cf2927971ce3a8715e9ae8a015e7 (diff) | |
[ADD] report for goal plans
bzr revid: mat@openerp.com-20130215133234-kp49lzfd5tjj1o7c
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr_goal/goal.py | 30 | ||||
| -rw-r--r-- | addons/hr_goal/view/plan.xml | 10 |
2 files changed, 37 insertions, 3 deletions
diff --git a/addons/hr_goal/goal.py b/addons/hr_goal/goal.py index 03a1f741440..259b483583b 100644 --- a/addons/hr_goal/goal.py +++ b/addons/hr_goal/goal.py @@ -54,6 +54,19 @@ GAMIFICATION_VALIDATION_CONDITION = [ ('plus','>=') ] +GAMIFICATION_REPORT_MODE = [ + ('board','Leader board'), + ('progressbar','Personal progressbar') +] + +GAMIFICATION_REPORT_FREQ = [ + ('onchange','On change'), + ('daily','Daily'), + ('weekly','Weekly'), + ('monthly','Monthly'), + ('yearly', 'Yearly') +] + class gamification_goal_type(osv.Model): """Goal type definition @@ -161,7 +174,9 @@ class gamification_goal_plan(osv.Model): 'plan_id', string='Planline', help="list of goals that will be set"), - 'group_id' : fields.many2one('res.groups', string='Group'), + 'autojoin_group_id' : fields.many2one('res.groups', + string='Group', + help='Group of users whose members will automatically be added to the users'), 'period' : fields.selection(GAMIFICATION_PERIOD_STATUS, string='Period', help='Period of automatic goal assigment, will be done manually if none is selected', @@ -169,11 +184,24 @@ class gamification_goal_plan(osv.Model): 'status': fields.selection(GAMIFICATION_PLAN_STATUS, string='Status', required=True), + 'report_mode':fields.selection(GAMIFICATION_REPORT_MODE, + string="Mode", + help='How is displayed the results, shared or in a signle progressbar', + required=True), + 'report_message_frequency':fields.selection(GAMIFICATION_REPORT_FREQ, + string="Frequency", + required=True), + 'report_message_group_id' : fields.many2one('mail.group', + string='Group', + help='Group that will receive the report in addition to the user'), + 'report_header' : fields.text('Report header'), } _defaults = { 'period': 'once', 'status': 'inprogress', + 'report_mode' : 'progressbar', + 'report_message_frequency' : 'onchange', } diff --git a/addons/hr_goal/view/plan.xml b/addons/hr_goal/view/plan.xml index 3d9760bd37d..8d177c5201b 100644 --- a/addons/hr_goal/view/plan.xml +++ b/addons/hr_goal/view/plan.xml @@ -30,10 +30,16 @@ <field name="name" placeholder="Goal plan name"/> </h1> <group> - <group string="General"> + <group colspan="4"> <field name="period"/> <field name="status"/> </group> + <group string="Report"> + <field name="report_mode"/> + <field name="report_message_frequency"/> + <field name="report_message_group_id"/> + <field name="report_header"/> + </group> </group> <notebook> <page string="Goals"> @@ -41,7 +47,7 @@ </page> <page string="Subscription"> <group> - <field name="group_id" string="Group" /> + <field name="autojoin_group_id" string="Group" /> </group> <group> <field colspan="4" name="user_ids" widget="many2many_kanban"> |
