From cbdf42d1041bb41c7055cca90712ce51ea1c2b44 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Fri, 23 Dec 2011 10:02:10 +0100 Subject: [PATCH] [FIX] hr_holidays: fix domain in determination of employee leave status bzr revid: rco@openerp.com-20111223090210-v9rmu26fa3mfklp6 --- addons/hr_holidays/hr_holidays.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 34f30e9a5d6..58f3dd88872 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -399,13 +399,13 @@ class hr_employee(osv.osv): def _get_leave_status(self, cr, uid, ids, name, args, context=None): holidays_id = self.pool.get('hr.holidays').search(cr, uid, [('employee_id', 'in', ids), ('date_from','<=',time.strftime('%Y-%m-%d %H:%M:%S')), - ('date_to','>=',time.strftime('%Y-%m-%d %H:%M:%S')),('type','=','remove')], + ('date_to','>=',time.strftime('%Y-%m-%d %H:%M:%S')),('type','=','remove'),('state','not in',('cancel','refuse'))], context=context) result = {} for id in ids: result[id] = { 'current_leave_state': False, - 'current_leave_id': False + 'current_leave_id': False, } for holiday in self.pool.get('hr.holidays').browse(cr, uid, holidays_id, context=context): result[holiday.employee_id.id]['current_leave_state'] = holiday.state