Skip to content

Commit

Permalink
[IMP] hr_org_chart: add new menu Org Chart in Employee menu
Browse files Browse the repository at this point in the history
This commit adds a new menu called `Org Chart` in Emnployee menu
to directly have the Org chart view as first view when the user
clicks on that button.

task-3376776
  • Loading branch information
xavierbol committed Oct 16, 2023
1 parent 2f463b5 commit 3e5e6fd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions addons/hr_org_chart/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'data': [
'views/hr_department_views.xml',
'views/hr_views.xml',
'views/hr_org_chart_menus.xml',
],
'assets': {
'web._assets_primary_variables': [
Expand Down
13 changes: 13 additions & 0 deletions addons/hr_org_chart/views/hr_org_chart_menus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<menuitem
id="menu_hr_employee_org_chart"
name="Org Chart"
action="action_hr_employee_org_chart"
groups="hr.group_hr_user"
parent="hr.menu_hr_employee_payroll"
sequence="5"
/>

</odoo>
19 changes: 19 additions & 0 deletions addons/hr_org_chart/views/hr_views.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_hr_employee_org_chart" model="ir.actions.act_window">
<field name="name">Org Chart</field>
<field name="res_model">hr.employee</field>
<field name="view_mode">hierarchy,kanban,tree,form,activity,graph,pivot</field>
<field name="domain">[]</field>
<field name="context">{'chat_icon': True}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="hr.view_employee_filter"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new employee
</p><p>
With just a quick glance on the Odoo employee screen, you
can easily find all the information you need for each person;
contact data, job position, availability, etc.
</p>
</field>
</record>

<record id="hr_employee_view_form_inherit_org_chart" model="ir.ui.view">
<field name="name">hr.employee.view.form.inherit.org_chart</field>
<field name="model">hr.employee</field>
Expand Down

0 comments on commit 3e5e6fd

Please sign in to comment.