[IMP]hr_holiday: remove date_to condition from domain for getting correct value
authorDBR (OpenERP) <dbr@tinyerp.com>
Fri, 11 May 2012 10:23:14 +0000 (15:53 +0530)
committerDBR (OpenERP) <dbr@tinyerp.com>
Fri, 11 May 2012 10:23:14 +0000 (15:53 +0530)
bzr revid: dbr@tinyerp.com-20120511102314-3xx8ht0sylll31rw

addons/hr_holidays/hr_holidays.py

index 43d7202..92becaf 100644 (file)
@@ -487,7 +487,7 @@ 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'),('state','not in',('cancel','refuse'))],
+            ('type','=','remove'),('state','not in',('cancel','refuse'))],
            context=context)
         result = {}
         for id in ids: