diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml
index b0e63f6962b..4a44b94bf9c 100644
--- a/addons/base_setup/base_setup_installer.xml
+++ b/addons/base_setup/base_setup_installer.xml
@@ -217,13 +217,13 @@
form
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index d8605f297b0..7e044e66e0f 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -80,7 +80,7 @@ class hr_holidays_status(osv.osv):
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."),
'max_leaves': fields.function(_user_left_days, method=True, string='Maximum Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'leaves_taken': fields.function(_user_left_days, method=True, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'),
- 'remaining_leaves': fields.function(_user_left_days, method=True, string='Remaining Leaves', help='Maximum Leaves Allowed - Leaves Already Taken', multi='user_left_days'),
+ 'remaining_leaves': fields.function(_user_left_days, method=True, string='Remaining Legal Leaves', help='Maximum Leaves Allowed - Leaves Already Taken', multi='user_left_days'),
'double_validation': fields.boolean('Apply Double Validation', help="If its True then its Allocation/Request have to be validated by second validator")
}
_defaults = {
@@ -342,6 +342,11 @@ class hr_employee(osv.osv):
return True
def _get_remaining_days(self, cr, uid, ids, name, args, context=None):
+ type_obj = self.pool.get('hr.holidays.status')
+ status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context)
+ len_s=len(status_ids)
+ if len_s != 1 :
+ raise osv.except_osv(('Warning !'),_("You should have only one leave type without allowing override limit. %s Found !") % (len_s))
cr.execute("SELECT sum(h.number_of_days_temp) as days, h.employee_id from hr_holidays h join hr_holidays_status s on (s.id=h.holiday_status_id) where h.type='add' and h.state='validate' and s.limit=False group by h.employee_id")
res = cr.dictfetchall()
remaining = {}
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index 18bbfb2a7f8..2c1066aa6d8 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -639,12 +639,14 @@
form
-
-
-
-
-
-
+
+
+
+
+
+
+
+