[MERGE] [FIX] hr_timesheet_sheet: make it timezone tolerant and avoid errors when...
authorMartin Trigaux <mat@openerp.com>
Mon, 28 Apr 2014 15:32:16 +0000 (01:32 +1000)
committerMartin Trigaux <mat@openerp.com>
Mon, 28 Apr 2014 15:32:16 +0000 (01:32 +1000)
commitc393fbcddd21c17996137e85102d2b8d5ef267a6
treeddffc33c507d95b4e071162b3e5f23ac97413102
parent4836354a164306e9fb9f02e1dcc07bba24ba3def
parent22d1c0956ffab1ef190cd67daed75cf8ff12963c
[MERGE] [FIX] hr_timesheet_sheet: make it timezone tolerant and avoid errors when comparing datetime and dates, courtesy of Yannick Vaucher (Camptocamp)

The attendance date recieved by the server is in UTC while the user sees it in his timezone. This means that an attendance could be in a timesheet (bounded by dates) for a user but not for the server which would not accept a valid attendance.
The fix will make the check in the user's timezone.

Only the date part of the attendance is kept for comparison as the boundaries are dates objects.

bzr revid: mat@openerp.com-20140428153216-4s6r5hu1ov0p0ofm
addons/hr_timesheet_sheet/hr_timesheet_sheet.py