From 4c30879da8d375cf3c3f4c7cb414817a5dc9bd78 Mon Sep 17 00:00:00 2001 From: Kinjal Mehta Date: Thu, 5 May 2016 11:10:19 +0530 Subject: [PATCH] [IMP] hr_holidays: Several usability improvements Change the menu tip of Allocation Request, Leaves, Leaves Allocations and Leaves details. Change the filter name 'Current Year' instead of Current. The default filter My requests has been removed. (in SAAS10, there is a ir_rule forcing the exact same domain) And In the m2o field leave type in leave request, change it in to (3 remaining out of 5) instead of like (3/5). --- addons/hr_holidays/hr_holidays.py | 2 +- addons/hr_holidays/hr_holidays_view.xml | 30 +++++++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 8db93ea5a7c..46a39a1367d 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -94,7 +94,7 @@ class hr_holidays_status(osv.osv): for record in self.browse(cr, uid, ids, context=context): name = record.name if not record.limit: - name = name + (' (%g/%g)' % (record.virtual_remaining_leaves or 0.0, record.max_leaves or 0.0)) + name = name + (' (%g remaining out of %g)' % (record.virtual_remaining_leaves or 0.0, record.max_leaves or 0.0)) res.append((record.id, name)) return res diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index 455c8934aec..676ec7517fd 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -36,7 +36,7 @@ - @@ -269,7 +269,6 @@ { 'default_type': 'remove', - 'search_default_my_leaves':1, 'needaction_menu_ref': [ 'hr_holidays.menu_open_company_allocation', @@ -351,12 +350,16 @@ form { 'default_type':'add', - 'search_default_my_leaves':1, 'needaction_menu_ref': [ 'hr_holidays.menu_open_company_allocation', ] } + +

+ Click here to create a new leave allocation request. +

+
[('type','=','add')] @@ -419,7 +422,6 @@ { 'search_default_group_type': 1, 'search_default_year': 1 , - 'search_default_my_leaves': 1, 'needaction_menu_ref': [ 'hr_holidays.menu_open_ask_holidays_new', @@ -428,6 +430,11 @@ 'hr_holidays.menu_open_employee_leave', ] } + +

+ Click here to create a new leave request. +

+
[('holiday_type','=','employee')] @@ -441,6 +448,11 @@ tree,form,calendar {'default_type': 'remove', 'search_default_todo': 1} + +

+ Click here to create a new leave request. +

+
[('type','=','remove')] @@ -451,6 +463,11 @@ form tree,form,calendar {'search_default_department':1, 'search_default_approve':1} + +

+ Click here to create a new leave request. +

+
[('type','=','remove')] @@ -463,6 +480,11 @@ form tree,form,calendar {'default_type':'add', 'search_default_department':1, 'search_default_approve':1} + +

+ Click here to create a new leave allocation. +

+
[('type','=','add')]