diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 9ff647b0231..839c635c896 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -334,7 +334,7 @@ class hr_employee(osv.osv): # Find for holidays status status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context) if len(status_ids) != 1 : - raise osv.except_osv(('warning !'),_("To use this feature, you should have only one leave type without the option 'Allow to Override Limit' set (%s Found).") % (len(status_ids))) + raise osv.except_osv(('Warning !'),_("To use this feature, you must have only one leave type without the option 'Allow to Override Limit' set. (%s Found).") % (len(status_ids))) status_id = status_ids and status_ids[0] or False if not status_id: return False @@ -349,7 +349,7 @@ class hr_employee(osv.osv): return True def _get_remaining_days(self, cr, uid, ids, name, args, context=None): - 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") + 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 = {} for r in res: @@ -361,7 +361,7 @@ class hr_employee(osv.osv): _columns = { - 'remaining_leaves': fields.function(_get_remaining_days, method=True, string='Remaining Leaves', fnct_inv=_set_remaining_days, type="float", help='Remaining Leaves', store=True), + 'remaining_leaves': fields.function(_get_remaining_days, method=True, string='Remaining Leaves', fnct_inv=_set_remaining_days, type="float", help='Total number of legal leaves allocated to this employee, change this value to create allocation request.', store=True), } hr_employee()