[7.0] hr_timesheet_sheet - timesheet start and end are without timezone as it is date instead of datetime
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP R&D Addons Team 3 | |||
OpenERP Community Backports (Addons) | Status tracked in 7.0 | |||||
7.0 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When entering attendances you might encounter serious issue as depending on the timezone, the attendances won't go on the correct timesheet.
This is due because a timesheet has its start and end date defined in as DATE format. Thus it will mean timesheet start and end have no timezone defined.
On the other hand, attendances will be in user timezone. This lead to attendances which will be out of scope of their timesheet if the timesheet was in local timezone too.
Now let's say that a DATE in database means the timesheet is in users' timezone. Because a date isn't precise to be converted without overlapping from UTC to local timezone. And because it doesn't make sens for an Australian business to have its timesheets in UTC.
Then we need to match attendances to this local timezone when trying to match the sheet_id on attendance. And as we have no timezone field defined on timesheet what we can do is taking this information from the employee.
See linked MP
Related branches
- Martin Trigaux (OpenERP) (community): Approve
-
Diff: 98 lines (+46/-11)1 file modifiedhr_timesheet_sheet/hr_timesheet_sheet.py (+46/-11)
- Stefan Rijnhart (Opener): Approve
- Pedro Manuel Baeza: Approve (code review, no test)
- Holger Brunn (Therp): Approve (code review)
-
Diff: 43 lines (+17/-3)1 file modifiedhr_timesheet_sheet/hr_timesheet_sheet.py (+17/-3)
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3) |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: hr sheet timesheet |
Hi Yannick,
The bug below that I posted in May:
https:/ /bugs.launchpad .net/openobject -addons/ +bug/1179893
is still present and although it appears related to your bug, almost seems to be the opposite, ie. the attendance time stamp is not recorded (or perhaps converted) correctly within the database according to a users timezone.
And you're right about a business in Australia...no sense at all:)
Thanks,
Bill
Brisbane, Australia