141 lines
7.0 KiB
XML
141 lines
7.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<!-- Wizard -->
|
|
|
|
<record id="gamification.view_badge_wizard_grant" model="ir.ui.view">
|
|
<field name="name">Grant Badge Employee Form</field>
|
|
<field name="model">gamification.badge.user.wizard</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Grant Badge To" version="7.0">
|
|
Who would you like to reward?
|
|
<group>
|
|
<field name="employee_id" nolabel="1" domain="[('user_id', '!=', False)]" />
|
|
<field name="badge_id" invisible="1"/>
|
|
<field name="comment" nolabel="1" placeholder="Describe what they did and why it matters (will be public)" class="oe_no_padding"/>
|
|
</group>
|
|
<footer>
|
|
<button string="Grant Badge" type="object" name="action_grant_badge" class="oe_highlight" /> or
|
|
<button string="Cancel" special="cancel" class="oe_link"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="gamification.view_badge_wizard_reward" model="ir.ui.view">
|
|
<field name="name">Reward Employee Badge Form</field>
|
|
<field name="model">gamification.badge.user.wizard</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Reward Employee with" version="7.0">
|
|
What are you thank for?
|
|
<group>
|
|
<field name="employee_id" invisible="1" />
|
|
<field name="badge_id" nolabel="1" colspan="4" />
|
|
<field name="comment" nolabel="1" placeholder="Describe what they did and why it matters (will be public)" />
|
|
</group>
|
|
<footer>
|
|
<button string="Reward Employee" type="object" name="action_grant_badge" class="oe_highlight" /> or
|
|
<button string="Cancel" special="cancel" class="oe_link"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<act_window domain="[]" id="action_reward_wizard"
|
|
name="Reward Employee"
|
|
target="new"
|
|
res_model="gamification.badge.user.wizard"
|
|
context="{'default_employee_id': active_id, 'employee_id': active_id}"
|
|
view_type="form" view_mode="form"
|
|
view_id="gamification.view_badge_wizard_reward"/>
|
|
|
|
<record id="hr_badge_form_view" model="ir.ui.view">
|
|
<field name="name">Badge Form</field>
|
|
<field name="model">gamification.badge</field>
|
|
<field name="inherit_id" ref="gamification.badge_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//div[@class='oe_right oe_button_box']" position="inside">
|
|
<button string="Granted Employees" type="object" name="get_granted_employees" attrs="{'invisible': [('stat_count','=',0)]}" />
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- HR Employee -->
|
|
|
|
<record id="hr_hr_employee_view_form" model="ir.ui.view">
|
|
<field name="name">hr.hr.employee.view.form</field>
|
|
<field name="model">hr.employee</field>
|
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
|
<field name="arch" type="xml">
|
|
|
|
<xpath expr="//page[@string='Public Information']" position="before">
|
|
<page string="Received Badges" attrs="{'invisible': [('user_id', '=', False)]}">
|
|
<field name="has_badges" invisible="1"/>
|
|
<button string="Grant a Badge" type="action" name="%(action_reward_wizard)d"/> to reward this employee for a good action
|
|
<div class="oe_view_nocontent" attrs="{'invisible': [('has_badges', '=', True)]}">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to grant this employee his first badge
|
|
</p><p class="oe_grey">
|
|
Badges are rewards of good work. Give them to people you believe deserve it.
|
|
</p>
|
|
</div>
|
|
<field name="badge_ids" widget="many2many_kanban" />
|
|
</page>
|
|
</xpath>
|
|
<xpath expr="//page[@string='Public Information']" position="after">
|
|
<page string="Goals">
|
|
<field name="goal_ids" widget="many2many_kanban" />
|
|
</page>
|
|
</xpath>
|
|
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<record id="goals_menu_groupby_action2" model="ir.actions.act_window">
|
|
<field name="res_model">gamification.goal</field>
|
|
<field name="view_type">form</field>
|
|
<field name="name">Goals History</field>
|
|
<field name="view_mode">tree,kanban</field>
|
|
<field name="context">{'search_default_group_by_user': True, 'search_default_group_by_type': True}</field>
|
|
<field name="domain">[('plan_id.category', '=', 'hr')]</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_plan_list_action2" model="ir.actions.act_window">
|
|
<field name="name">Challenges</field>
|
|
<field name="res_model">gamification.goal.plan</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="domain">[('category', '=', 'hr')]</field>
|
|
<field name="context">{'search_default_inprogress':True, 'default_inprogress':True}</field>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to create a challenge.
|
|
</p>
|
|
<p>
|
|
Assign a list of goals to chosen users to evaluate them.
|
|
The challenge can use a period (weekly, monthly...) for automatic creation of goals.
|
|
The goals are created for the specified users or member of the group.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_hr_gamification" parent="hr.menu_hr_root" name="Engagement" sequence="40"/>
|
|
|
|
<menuitem id="gamification_badge_menu_hr" parent="menu_hr_gamification" action="gamification.badge_list_action" />
|
|
<menuitem id="gamification_plan_menu_hr" parent="menu_hr_gamification" action="goal_plan_list_action2" groups="base.group_hr_user"/>
|
|
<menuitem id="gamification_goal_menu_hr" parent="menu_hr_gamification" action="goals_menu_groupby_action2" groups="base.group_hr_user"/>
|
|
|
|
</data>
|
|
</openerp>
|