summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay (Open ERP) <jvo@tinyerp.com>2009-06-30 20:41:37 +0530
committerJay (Open ERP) <jvo@tinyerp.com>2009-06-30 20:41:37 +0530
commit0e728b69f6128e76cfdfe8fcb7f22f4cd5de7127 (patch)
tree363b94daa9a76ba242accb1e5596152aa249fdea
parente53d2ca95b6ee9de4105b2a9270c54a48c83e5ac (diff)
[FIX] hr_timesheet_sheet : date interval corrected for attendances
lp bug: https://launchpad.net/bugs/393798 fixed bzr revid: jvo@tinyerp.com-20090630151137-hrcfrqavdi2zlz7a
-rw-r--r--addons/hr_timesheet_sheet/hr_timesheet_sheet.py8
1 files 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 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