gamification_views.xml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <record id="hr_badge_form_view" model="ir.ui.view">
  4. <field name="name">gamification.badge.form.inherit</field>
  5. <field name="model">gamification.badge</field>
  6. <field name="inherit_id" ref="gamification.badge_form_view"/>
  7. <field name="arch" type="xml">
  8. <div name="button_box" position="inside">
  9. <button class="oe_stat_button" type="object" name="get_granted_employees" attrs="{'invisible': [('granted_count','=',0)]}" icon="fa-user">
  10. <field name="granted_employees_count" string="Granted" widget="statinfo"/>
  11. </button>
  12. </div>
  13. </field>
  14. </record>
  15. <record id="goals_menu_groupby_action2" model="ir.actions.act_window">
  16. <field name="res_model">gamification.goal</field>
  17. <field name="name">Goals History</field>
  18. <field name="view_mode">tree,kanban</field>
  19. <field name="context">{'search_default_group_by_user': True, 'search_default_group_by_definition': True}</field>
  20. <field name="domain">[('challenge_id.challenge_category', '=', 'hr')]</field>
  21. <field name="help" type="html">
  22. <p class="o_view_nocontent_smiling_face">
  23. Create a new goal
  24. </p><p>
  25. A goal is defined by a user and a goal type.
  26. Goals can be created automatically by using challenges.
  27. </p>
  28. </field>
  29. </record>
  30. <record id="challenge_list_action2" model="ir.actions.act_window">
  31. <field name="name">Challenges</field>
  32. <field name="res_model">gamification.challenge</field>
  33. <field name="view_mode">kanban,tree,form</field>
  34. <field name="domain">[('challenge_category', '=', 'hr')]</field>
  35. <field name="context">{'search_default_inprogress':True, 'default_inprogress':True}</field>
  36. <field name="help" type="html">
  37. <p class="o_view_nocontent_smiling_face">
  38. Create a new challenge
  39. </p><p>
  40. Assign a list of goals to chosen users to evaluate them.
  41. The challenge can use a period (weekly, monthly...) for automatic creation of goals.
  42. The goals are created for the specified users or member of the group.
  43. </p>
  44. </field>
  45. </record>
  46. <record id="challenge_list_action2_view1" model="ir.actions.act_window.view">
  47. <field name="sequence" eval="1"/>
  48. <field name="view_mode">kanban</field>
  49. <field name="act_window_id" ref="challenge_list_action2"/>
  50. <field name="view_id" ref="gamification.view_challenge_kanban"/>
  51. </record>
  52. <record id="challenge_list_action2_view2" model="ir.actions.act_window.view">
  53. <field name="sequence" eval="10"/>
  54. <field name="view_mode">form</field>
  55. <field name="act_window_id" ref="challenge_list_action2"/>
  56. <field name="view_id" ref="gamification.challenge_form_view"/>
  57. </record>
  58. <menuitem id="menu_hr_gamification" parent="hr.menu_human_resources_configuration" name="Challenges" sequence="100"/>
  59. <menuitem id="gamification_badge_menu_hr" parent="menu_hr_gamification" action="gamification.badge_list_action" />
  60. <menuitem id="gamification_challenge_menu_hr" parent="menu_hr_gamification" action="challenge_list_action2" groups="hr.group_hr_user"/>
  61. <menuitem id="gamification_goal_menu_hr" parent="menu_hr_gamification" action="goals_menu_groupby_action2" groups="hr.group_hr_user"/>
  62. </odoo>