[ADD] plan views for gamification moduel
bzr revid: mat@openerp.com-20130215130921-ca64o47syxn6vob1
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
'data': [
|
||||
'view/type.xml',
|
||||
'view/goal.xml',
|
||||
'view/plan.xml',
|
||||
'view/menu.xml',
|
||||
],
|
||||
'installable': True,
|
||||
|
||||
@@ -155,8 +155,12 @@ class gamification_goal_plan(osv.Model):
|
||||
_columns = {
|
||||
'name' : fields.char('Plan name', required=True),
|
||||
'user_ids' : fields.many2many('res.users',
|
||||
string='Definition',
|
||||
string='Users',
|
||||
help="list of users to which the goal will be set"),
|
||||
'planline_ids' : fields.one2many('gamification.goal.planline',
|
||||
'plan_id',
|
||||
string='Planline',
|
||||
help="list of goals that will be set"),
|
||||
'group_id' : fields.many2one('res.groups', string='Group'),
|
||||
'period' : fields.selection(GAMIFICATION_PERIOD_STATUS,
|
||||
string='Period',
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="definition_list_action" model="ir.actions.act_window">
|
||||
<field name="name">Goal definitions</field>
|
||||
<field name="res_model">hr.goal.definition</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="predifined_menu" name="Predifined" parent="root_menu"/>
|
||||
|
||||
<menuitem id="definitions_menu" parent="predifined_menu"
|
||||
action="definition_list_action"/>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- <menuitem id="root_menu" name="Gamification"/> -->
|
||||
<menuitem id="gamification_menu" name="Gamification Tools" parent="base.menu_administration"/>
|
||||
<!-- Goal types -->
|
||||
<menuitem id="gamification_type_menu" parent="gamification_menu" action="goal_type_list_action"/>
|
||||
<!-- Goals -->
|
||||
<menuitem id="gamification_goal_menu" parent="gamification_menu" action="goal_list_action"/>
|
||||
|
||||
<!-- Goals -->
|
||||
<menuitem id="gamification_goal_menu" parent="gamification_menu" action="goal_list_action" sequence="0"/>
|
||||
<!-- Goal plans -->
|
||||
<menuitem id="gamification_plan_menu" parent="gamification_menu" action="goal_plan_list_action" sequence="10"/>
|
||||
<!-- Goal types -->
|
||||
<menuitem id="gamification_type_menu" parent="gamification_menu" action="goal_type_list_action" sequence="20"/>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="goal_plan_list_action" model="ir.actions.act_window">
|
||||
<field name="name">Goal plans</field>
|
||||
<field name="res_model">gamification.goal.plan</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record id="goal_plan_list_view" model="ir.ui.view">
|
||||
<field name="name">Goal plans list</field>
|
||||
<field name="model">gamification.goal.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Goal types" colors="blue:status == 'inprogress';grey:status == 'done'">
|
||||
<field name="name"/>
|
||||
<field name="period"/>
|
||||
<field name="status" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="goal_type_form_view" model="ir.ui.view">
|
||||
<field name="name">Goal plan form</field>
|
||||
<field name="model">gamification.goal.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Goal types" version="7.0">
|
||||
<sheet>
|
||||
<h1>
|
||||
<field name="name" placeholder="Goal plan name"/>
|
||||
</h1>
|
||||
<group>
|
||||
<group string="General">
|
||||
<field name="period"/>
|
||||
<field name="status"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Goals">
|
||||
<field name="planline_ids"/>
|
||||
</page>
|
||||
<page string="Subscription">
|
||||
<group>
|
||||
<field name="group_id" string="Group" />
|
||||
</group>
|
||||
<group>
|
||||
<field colspan="4" name="user_ids" widget="many2many_kanban">
|
||||
<kanban quick_create="false" create="true">
|
||||
<field name="name"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div style="position: relative">
|
||||
<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
|
||||
<div class="oe_module_vignette">
|
||||
<div class="oe_module_desc">
|
||||
<field name="name"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="preset_list_action" model="ir.actions.act_window">
|
||||
<field name="name">Presets</field>
|
||||
<field name="res_model">hr.goal.preset</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="presets_menu" parent="predifined_menu"
|
||||
action="preset_list_action"/>
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user