2013-02-15 10:42:14 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<openerp >
<data >
2013-02-28 13:53:29 +00:00
<!-- Goal views -->
2013-02-15 10:42:14 +00:00
<record id= "goal_list_action" model= "ir.actions.act_window" >
<field name= "name" > Goals</field>
<field name= "res_model" > gamification.goal</field>
2013-03-05 10:44:11 +00:00
<field name= "view_mode" > tree,form,calendar,kanban</field>
2013-02-19 16:30:48 +00:00
<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>
2013-02-15 10:42:14 +00:00
</record>
<record id= "goal_list_view" model= "ir.ui.view" >
2013-02-18 13:06:56 +00:00
<field name= "name" > Goal List</field>
2013-02-15 10:42:14 +00:00
<field name= "model" > gamification.goal</field>
<field name= "arch" type= "xml" >
2013-02-22 09:47:45 +00:00
<tree string= "Goal List" colors= "red:state == 'failed';green:state == 'reached';grey:state == 'canceled'" >
2013-02-15 10:42:14 +00:00
<field name= "type_id" />
<field name= "user_id" />
<field name= "current" />
<field name= "target_goal" />
<field name= "start_date" />
<field name= "end_date" />
2013-02-15 14:54:15 +00:00
<field name= "completeness" widget= "progressbar" />
2013-02-15 14:16:51 +00:00
<field name= "state" invisible= "1" />
2013-02-20 12:33:28 +00:00
<field name= "planline_id" invisible= "1" />
2013-02-15 10:42:14 +00:00
</tree>
</field>
</record>
<record id= "goal_form_view" model= "ir.ui.view" >
2013-02-18 13:06:56 +00:00
<field name= "name" > Goal Form</field>
2013-02-15 10:42:14 +00:00
<field name= "model" > gamification.goal</field>
<field name= "arch" type= "xml" >
<form string= "Goal" version= "7.0" >
2013-02-15 14:16:51 +00:00
<header >
2013-02-27 11:12:20 +00:00
<button string= "Start goal" type= "object" name= "action_start" states= "draft" class= "oe_highlight" />
2013-02-27 16:56:00 +00:00
2013-02-20 12:33:28 +00:00
<button string= "Goal Reached" type= "object" name= "action_reach" states= "inprogress,inprogress_update" />
2013-02-19 16:56:09 +00:00
<button string= "Goal Failed" type= "object" name= "action_fail" states= "inprogress,inprogress_update" />
2013-02-19 10:33:51 +00:00
<button string= "Reset Completion" type= "object" name= "action_cancel" states= "failed,reached" />
2013-02-21 13:50:00 +00:00
<field name= "state" widget= "statusbar" statusbar_visible= "inprogress" />
2013-02-15 14:16:51 +00:00
</header>
2013-02-15 10:42:14 +00:00
<sheet >
<group >
<group string= "Reference" >
2013-02-22 13:40:24 +00:00
<field name= "type_id" on_change= "on_change_type_id(type_id)" attrs= "{'readonly':[('state','!=','draft')]}" />
<field name= "user_id" attrs= "{'readonly':[('state','!=','draft')]}" />
<field name= "planline_id" groups= "base.group_no_one" attrs= "{'readonly':[('state','!=','draft')]}" />
2013-02-15 10:42:14 +00:00
</group>
<group string= "Schedule" >
2013-02-22 13:40:24 +00:00
<field name= "start_date" attrs= "{'readonly':[('state','!=','draft')]}" />
2013-03-01 11:27:20 +00:00
<field name= "end_date" />
2013-02-20 16:05:17 +00:00
<field name= "computation_mode" invisible= "1" />
2013-02-22 09:47:45 +00:00
<label for= "remind_update_delay" attrs= "{'invisible':[('computation_mode','!=', 'manually')]}" />
<div attrs= "{'invisible':[('computation_mode','!=', 'manually')]}" >
<field name= "remind_update_delay" class= "oe_inline" />
days
</div>
2013-02-21 13:50:00 +00:00
<field name= "last_update" groups= "base.group_no_one" />
2013-02-15 10:42:14 +00:00
</group>
2013-02-27 16:56:00 +00:00
<group string= "Data" colspan= "4" >
2013-02-22 13:40:24 +00:00
<field name= "target_goal" attrs= "{'readonly':[('state','!=','draft')]}" />
2013-02-27 16:56:00 +00:00
<label for= "current" />
<div >
<field name= "current" attrs= "{'readonly':[('computation_mode','!=','manually')]}" class= "oe_inline" />
<button string= "Refresh state" type= "object" name= "update" states= "inprogress,inprogress_update,failed,reached" class= "oe_highlight oe_inline" />
<button name= "write" type= "object" string= "The current value is up to date" help= "Indicate that the current value of the manual goal is still correct and avoid reminders" attrs= "{'invisible':[('computation_mode','!=', 'manually')]}" />
</div>
2013-02-15 10:42:14 +00:00
</group>
</group>
</sheet>
2013-02-19 09:08:26 +00:00
<div class= "oe_chatter" >
2013-02-28 09:22:47 +00:00
<field name= "message_follower_ids" widget= "mail_followers" />
2013-02-19 09:08:26 +00:00
<field name= "message_ids" widget= "mail_thread" />
</div>
2013-02-15 10:42:14 +00:00
</form>
</field>
</record>
<record id= "goal_calendar_view" model= "ir.ui.view" >
2013-02-18 13:06:56 +00:00
<field name= "name" > Goal Calendar</field>
2013-02-15 10:42:14 +00:00
<field name= "model" > gamification.goal</field>
<field name= "arch" type= "xml" >
<calendar string= "Goal"
date_start="start_date"
date_stop="end_date"
color="type_id">
<field name= "type_id" />
</calendar>
</field>
</record>
2013-02-18 13:48:03 +00:00
<record id= "goal_search_view" model= "ir.ui.view" >
<field name= "name" > Goal Search</field>
<field name= "model" > gamification.goal</field>
<field name= "arch" type= "xml" >
<search string= "Search Goals" >
2013-02-28 11:28:10 +00:00
<filter name= "my" string= "My Goals" domain= "[('user_id', '=', uid)]" />
<separator />
<filter name= "draft" string= "Draft" domain= "[('state', '=', 'draft')]" />
<filter name= "inprogress" string= "In Progress" domain= "[('state', 'in', ('inprogress', 'inprogress_update'))]" />
<filter name= "closed" string= "Closed" domain= "[('state', 'in', ('reached', 'failed'))]" />
<separator />
2013-02-20 12:33:28 +00:00
<field name= "planline_id" />
2013-02-19 13:23:06 +00:00
<field name= "user_id" />
<field name= "type_id" />
2013-02-18 13:48:03 +00:00
<group expand= "0" string= "Group By..." >
<filter string= "User" domain= "[]" context= "{'group_by':'user_id'}" />
<filter string= "Goal Type" domain= "[]" context= "{'group_by':'type_id'}" />
<filter string= "State" domain= "[]" context= "{'group_by':'state'}" />
<filter string= "End Date" domain= "[]" context= "{'group_by':'end_date'}" />
</group>
</search>
</field>
</record>
2013-03-05 10:44:11 +00:00
<record id= "goal_kanban_view" model= "ir.ui.view" >
<field name= "name" > Goal Kanban View</field>
<field name= "model" > gamification.goal</field>
<field name= "arch" type= "xml" >
<kanban version= "7.0" class= "oe_background_grey" >
<field name= "type_id" />
<field name= "user_id" />
<field name= "current" />
<field name= "completeness" />
<field name= "state" />
<field name= "target_goal" />
<templates >
<t t-name= "kanban-box" >
<div t-attf-class= "oe_kanban_card oe_kanban_global_click oe_kanban_goal oe_kanban_color_#{record.state.raw_value}" >
<div class= "oe_kanban_content" >
<h4 > <field name= "type_id" /> </h4>
<div class= "oe_kanban_project_list" >
<t t-esc= "Math.round(record.current.raw_value)" /> /<t t-esc= "Math.round(record.target_goal.raw_value)" />
⟨ <t t-esc= "Math.round(record.completeness.raw_value)" /> %%⟩
</div>
</div>
</div>
</t>
</templates> 7
</kanban>
</field>
</record>
2013-02-28 13:53:29 +00:00
<!-- Goal types view -->
<record id= "goal_type_list_action" model= "ir.actions.act_window" >
<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" >
<field name= "name" > Goal Types List</field>
<field name= "model" > gamification.goal.type</field>
<field name= "arch" type= "xml" >
<tree string= "Goal types" >
<field name= "sequence" widget= "handle" />
<field name= "name" />
<field name= "computation_mode" />
</tree>
</field>
</record>
<record id= "goal_type_form_view" model= "ir.ui.view" >
<field name= "name" > Goal Types Form</field>
<field name= "model" > gamification.goal.type</field>
<field name= "arch" type= "xml" >
<form string= "Goal types" version= "7.0" >
<sheet >
<h1 >
<div class= "oe_edit_only" >
<label for= "name" />
</div>
<field name= "name" />
</h1>
<group >
<group string= "General" >
<field name= "description" />
<field name= "condition" />
</group>
<group string= "Computation" >
<field name= "computation_mode" />
<!-- Hide the fields below if manually -->
<field name= "model_id" attrs= "{'invisible':[('computation_mode','=','manually')], 'required':[('computation_mode','!=','manually')]}" />
<field name= "field_id" attrs= "{'invisible':[('computation_mode','!=','sum')], 'required':[('computation_mode','=','sum')]}" domain= "[('model_id','=',model_id)]" />
<field name= "field_date_id" attrs= "{'invisible':[('computation_mode','=','manually')]}" domain= "[('ttype', 'in', ('date', 'datetime')), ('model_id','=',model_id)]" />
<field name= "domain" attrs= "{'invisible':[('computation_mode','=','manually')], 'required':[('computation_mode','!=','manually')]}" />
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id= "goal_type_search_view" model= "ir.ui.view" >
<field name= "name" > Goal Type Search</field>
<field name= "model" > gamification.goal.type</field>
<field name= "arch" type= "xml" >
<search string= "Search Goal Types" >
<field name= "name" />
<field name= "model_id" />
<field name= "field_id" />
<group expand= "0" string= "Group By..." >
<filter string= "Model" domain= "[]" context= "{'group_by':'model_id'}" />
<filter string= "Computation Mode" domain= "[]" context= "{'group_by':'computation_mode'}" />
</group>
</search>
</field>
</record>
2013-03-01 15:42:26 +00:00
<!-- menus in settings - technical feature required -->
<menuitem id= "gamification_menu" name= "Gamification Tools" parent= "base.menu_administration" groups= "base.group_no_one" />
2013-02-28 14:19:33 +00:00
<menuitem id= "gamification_goal_menu" parent= "gamification_menu" action= "goal_list_action" sequence= "0" />
<menuitem id= "gamification_plan_menu" parent= "gamification_menu" action= "goal_plan_list_action" sequence= "10" />
<menuitem id= "gamification_type_menu" parent= "gamification_menu" action= "goal_type_list_action" sequence= "20" />
2013-02-15 10:42:14 +00:00
</data>
2013-02-28 14:19:33 +00:00
</openerp>