From 81865eae1b48d4b75766d33a6223eb241148646f Mon Sep 17 00:00:00 2001 From: ced <> Date: Mon, 16 Apr 2007 06:19:24 +0000 Subject: [PATCH] HR_TIMESHEET_SHEET: fix date compare to datetime bzr revid: ced-c3f2ec79c8bebadc22685127c03b230b4809be41 --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 0b0562ae7b7..cef4f8f742a 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -283,9 +283,9 @@ class hr_timesheet_line(osv.osv): def _sheet_date(self, cr, uid, ids): timesheet_lines = self.browse(cr, uid, ids) for l in timesheet_lines: - if l.date < l.sheet_id.date_from: + if l.date[:10] < l.sheet_id.date_from: return False - if l.date > l.sheet_id.date_to: + if l.date[:10] > l.sheet_id.date_to: return False return True @@ -327,9 +327,9 @@ class hr_attendance(osv.osv): def _sheet_date(self, cr, uid, ids): attendances = self.browse(cr, uid, ids) for att in attendances: - if att.name < att.sheet_id.date_from: + if att.name[:10] < att.sheet_id.date_from: return False - if att.name > att.sheet_id.date_to: + if att.name[:10] > att.sheet_id.date_to: return False return True