diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 17eabbc2f16..9d8bdb1ba64 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -503,8 +503,8 @@ class hr_attendance(osv.osv): LEFT JOIN (hr_attendance a \ LEFT JOIN hr_employee e \ ON (a.employee_id = e.id)) \ - ON (s.date_to >= a.name \ - AND s.date_from <= a.name \ + ON (s.date_to >= a.name::date \ + AND s.date_from <= a.name::date \ AND s.user_id = e.user_id) ' + \ qu1, qu2) res = cursor.fetchall() @@ -623,8 +623,8 @@ class hr_timesheet_sheet_sheet_day(osv.osv): LEFT JOIN hr_employee e ON (s.user_id = e.user_id)) ON (a.employee_id = e.id - AND s.date_to >= a.name - AND s.date_from <= a.name) + AND s.date_to >= a.name::date + AND s.date_from <= a.name::date) WHERE action in ('sign_in', 'sign_out') group by a.name::date, s.id )) AS foo