[FIX] hr_timesheet_sheet : date interval corrected for attendances

lp bug: https://launchpad.net/bugs/393798 fixed

bzr revid: jvo@tinyerp.com-20090630151137-hrcfrqavdi2zlz7a
This commit is contained in:
Jay (Open ERP) 2009-06-30 20:41:37 +05:30
parent e53d2ca95b
commit 0e728b69f6
1 changed files with 4 additions and 4 deletions

View File

@ -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