Consider alternative recording of timezone #158
Description
Currently we save the timezone in the payslip and it applies to the whole month.
This is a major drawback for people that are changing timezones in the middle of the month, because recording attendance becomes a major pain.
The most correct way is to record attendance with the timezone information. Unfortunately Odoo 8 stores timestamps in UTC without timezone flag.
It might be possible to add a column in the timesheet view that contains the timezone field. If possible, an implementation could look like this:
- Add the
x_timezone
field to the Attendance data model in Odoo - Add a column
timezone
to the timesheet view. The users working abroad can then set the timezone for each attendance, similarly how Sick Leave is recorded in a Dropdown menu. - If the field is empty, default to
Europe/Zurich
, either via Odoo itself or at latest in Odootools. - No longer save the timezone in the payslip
- In odootools, apply the following precedence for timezone selection (first to last):
x_timezone
field of anAttendance
entryx_timezone
field of the current month's payslip- timezone setting in the user preferences
Europe/Zurich
as the last-resort fallback (so that Switzerland-based employees don't need to change anything)
There is one advantage with saving the timezone in payslip: A timezone can be applied to the whole month. So if an employee is the whole month outside Switzerland, they can just save it once in the payslip and not record every individual attendance with the timezone field.
That being said, this feature resp. extra column is only relevant for people changing the timezone in the middle of the month, since the timezone for a whole month can still be specified via payslip.
Reasoning: User experience
It's easier to record attendance in the local timezone and set the timezone in the column from a dropdown, than having to record all attendances of a month in a single timezone when changing timezones in the middle of the month.