summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorDenis 'Ledur' Vermylen <dve@odoo.com>2017-12-11 11:11:00 +0100
committerRichard Mathot <rim@odoo.com>2017-12-11 13:49:36 +0100
commitb8c95c2e0bd69f434d01a0fe9d4ca481b5106c86 (patch)
treec2b2aa6b49001e59980fbb4385b9688c0be866f0 /addons
parent6cc5ebed1aec3d0fc8ed4a341dc7652ef2cb1422 (diff)
[IMP] hr_holidays: menus reordering and cleaning
Diffstat (limited to 'addons')
-rw-r--r--addons/hr_holidays/report/hr_holidays_views.xml1
-rw-r--r--addons/hr_holidays/views/hr_holidays_views.xml53
2 files changed, 14 insertions, 40 deletions
diff --git a/addons/hr_holidays/report/hr_holidays_views.xml b/addons/hr_holidays/report/hr_holidays_views.xml
index c7b35577011..7324619e3fa 100644
--- a/addons/hr_holidays/report/hr_holidays_views.xml
+++ b/addons/hr_holidays/report/hr_holidays_views.xml
@@ -52,7 +52,6 @@
</record>
<menuitem
- name="Leaves"
id="menu_hr_available_holidays_report_tree"
action="action_hr_available_holidays_report"
parent="menu_hr_holidays_report" sequence="5"/>
diff --git a/addons/hr_holidays/views/hr_holidays_views.xml b/addons/hr_holidays/views/hr_holidays_views.xml
index 5e8349c6de6..40bf1154227 100644
--- a/addons/hr_holidays/views/hr_holidays_views.xml
+++ b/addons/hr_holidays/views/hr_holidays_views.xml
@@ -38,7 +38,7 @@
<filter name="year" string="Current Year"
domain="[('holiday_status_id.active', '=', True)]" help="Active Leaves and Allocations"/>
<separator/>
- <filter string="My Requests" name="my_leaves" domain="[('user_id', '=', uid)]"/>
+ <filter string="My Leaves" name="my_leaves" domain="[('user_id', '=', uid)]"/>
<separator/>
<filter name="leaves" string="Leaves" domain="[('type', '=', 'remove')]"/>
<filter name="allocations" string="Allocations" domain="[('type', '=', 'add')]"/>
@@ -248,26 +248,6 @@
</field>
</record>
- <record id="view_holiday_employee" model="ir.ui.view">
- <field name="name">hr.holidays.report_employee_tree</field>
- <field name="model">hr.holidays</field>
- <field name="priority">21</field>
- <field name="arch" type="xml">
- <tree decoration-danger="state == 'refuse'" decoration-info="state == 'draft'" string="Employee's Leave">
- <field name="employee_id"/>
- <field name="type"/>
- <field name="name"/>
- <field name="number_of_days" string="Number of Days" sum="Remaining Days"/>
- <field name="date_from"/>
- <field name="date_to"/>
- <field name="holiday_status_id"/>
- <field name="state"/>
- <field name="payslip_status" widget="toggle_button" options='{"active": "Reported in last payslips", "inactive": "To Report in Payslip"}' groups="hr_holidays.group_hr_holidays_manager"/>
- <field name="report_note"/>
- </tree>
- </field>
- </record>
-
<record id="view_holiday" model="ir.ui.view">
<field name="name">hr.holidays.tree</field>
<field name="model">hr.holidays</field>
@@ -325,7 +305,7 @@
<menuitem
id="menu_hr_holidays_approvals"
- name="Leaves to Approve"
+ name="Managers"
parent="menu_hr_holidays_root"
sequence="3"
groups="hr_holidays.group_hr_holidays_manager,hr_holidays.group_hr_holidays_user"/>
@@ -344,9 +324,8 @@
<field name="view_id" ref="edit_holiday_new"/>
<field name="context">{
'default_type': 'remove',
- 'search_default_my_leaves': 1,
}</field>
- <field name="domain">[('type','=','remove')]</field>
+ <field name="domain">[('type','=','remove'), ('user_id', '=', uid)]</field>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
@@ -361,7 +340,7 @@
</record>
<record id="action_open_ask_holidays_tree" model="ir.actions.act_window.view">
- <field name="sequence" eval="2"/>
+ <field name="sequence" eval="20"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_holiday"/>
<field name="act_window_id" ref="open_ask_holidays"/>
@@ -421,14 +400,13 @@
<field name="view_mode">tree,kanban,form</field>
<field name="context">{
'default_type':'add',
- 'search_default_my_leaves': 1,
}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to create a new leave allocation request.
</p>
</field>
- <field name="domain">[('type','=','add')]</field>
+ <field name="domain">[('type','=','add'), ('user_id', '=', uid)]</field>
<field name="view_id" ref="edit_holiday_new"/>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>
@@ -451,7 +429,7 @@
id="menu_open_allocation_holidays"
parent="menu_hr_holidays_my_leaves"
action="open_allocation_holidays"
- sequence="40"/>
+ sequence="30"/>
<record id="request_approve_allocation" model="ir.actions.act_window">
<field name="name">Allocation Request</field>
@@ -489,31 +467,29 @@
<field name="context">{
'search_default_group_type': 1,
'search_default_year': 1 ,
- 'search_default_my_leaves': 1,
}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to create a new leave request.
</p>
</field>
- <field name="domain">[('holiday_type','=','employee')]</field>
+ <field name="domain">[('holiday_type','=','employee'), ('user_id', '=', uid)]</field>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>
<menuitem
id="menu_open_company_allocation"
- name="Leaves Summary"
parent="menu_hr_holidays_my_leaves"
action="open_company_allocation"
- sequence="21"/>
+ sequence="10"/>
<record id="open_employee_leaves" model="ir.actions.act_window">
- <field name="name">Leave Details</field>
+ <field name="name">Leaves Overview</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar</field>
- <field name="view_id" eval="view_holiday_employee"/>
- <field name="context">{'default_type': 'remove', 'search_default_todo': 1}</field>
+ <field name="view_id" eval="view_holiday"/>
+ <field name="context">{'default_type': 'remove',}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to create a new leave request.
@@ -540,7 +516,7 @@
<menuitem
id="menu_open_department_leave_approve"
- name="Leaves"
+ name="Leaves to Approve"
parent="menu_hr_holidays_approvals"
groups="hr_holidays.group_hr_holidays_manager,hr_holidays.group_hr_holidays_user"
action="open_department_holidays_approve"
@@ -563,15 +539,14 @@
<menuitem
id="menu_open_department_leave_allocation_approve" groups="hr_holidays.group_hr_holidays_manager,hr_holidays.group_hr_holidays_user"
- name="Leaves Allocation"
+ name="Allocations to Approve"
parent="menu_hr_holidays_approvals"
action="open_department_holidays_allocation_approve"
sequence="2"/>
<menuitem
id="menu_open_employee_leave"
- name="Leave Details"
- parent="menu_hr_holidays_report"
+ parent="menu_hr_holidays_approvals"
groups="hr_holidays.group_hr_holidays_manager,hr_holidays.group_hr_holidays_user"
action="open_employee_leaves"
sequence="4"/>