[IMP] gamification: default help messages and better default filter

bzr revid: mat@openerp.com-20130219163048-d6cb69034nzbmj86
This commit is contained in:
Martin Trigaux
2013-02-19 17:30:48 +01:00
parent 28a3d695e6
commit d3750e5a8a
4 changed files with 42 additions and 15 deletions
+10 -12
View File
@@ -21,25 +21,23 @@
from openerp.osv import fields, osv
from datetime import date
GAMIFICATION_GOAL_STATE = [
('inprogress','In progress'),
('reached','Reached'),
('failed','Failed'),
('inprogress', 'In progress'),
('reached', 'Reached'),
('failed', 'Failed'),
]
GAMIFICATION_PLAN_STATE = [
('draft','Draft'),
('inprogress','In progress'),
('done','Done'),
('draft', 'Draft'),
('inprogress', 'In progress'),
('done', 'Done'),
]
GAMIFICATION_PERIOD_STATE = [
('once','Manual'),
('daily','Daily'),
('weekly','Weekly'),
('monthly','Monthly'),
('once', 'Manual'),
('daily', 'Daily'),
('weekly', 'Weekly'),
('monthly', 'Monthly'),
('yearly', 'Yearly')
]
+9
View File
@@ -6,6 +6,15 @@
<field name="res_model">gamification.goal</field>
<field name="view_mode">tree,form,calendar</field>
<field name="context">{'search_default_my_in_progress': 1}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a goal.
</p>
<p>
A goal is defined by a user and a goal type.
Goals can be created automatically by using goal plans.
</p>
</field>
</record>
<record id="goal_list_view" model="ir.ui.view">
+14 -3
View File
@@ -6,7 +6,18 @@
<field name="name">Goal Plans</field>
<field name="res_model">gamification.goal.plan</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_in_progress': 1}</field>
<field name="context">{'search_default_draft_active': 1}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a goal plan.
</p>
<p>
Goal plans allow to create and assign to users easily a list of goals.
A goal plan is a predifined list of goals types with a target value.
The plan can use a period (weekly, monthly...) for automatic creation of goals.
The goals are created for the specified users or memeber of the group.
</p>
</field>
</record>
<record id="goal_plan_list_view" model="ir.ui.view">
@@ -123,8 +134,8 @@
<field name="model">gamification.goal.plan</field>
<field name="arch" type="xml">
<search string="Search Goal Plans">
<filter name="in_progress" string="Plans in Progress"
domain="[('state', '=', 'inprogress')]"/>
<filter name="draft_active" string="Draft or Active Plans"
domain="[('state', 'in', ('inprogress', 'draft'))]"/>
<field name="name"/>
<group expand="0" string="Group By...">
<filter string="State" domain="[]" context="{'group_by':'state'}"/>
+9
View File
@@ -6,6 +6,15 @@
<field name="name">Goal Types</field>
<field name="res_model">gamification.goal.type</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a goal type.
</p>
<p>
A goal type is a technical model of goal defining a condition to reach.
The dates, values to reach or users are defined in goal instance.
</p>
</field>
</record>
<record id="goal_type_list_view" model="ir.ui.view">