openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #24769
[Bug 1215900] [NEW] Wrong Attendance timespan displayed in hr_timesheet_sheet
Public bug reported:
When signing in with the attendance function of the timesheet, it displays a value that is higher by the amount of current timezone offset. For example: Germany has a timezone offset of 2 (at summer time). So when i log in, i should get displayed a attendence time of 00:00 hours, but it displays 02:00 hours. The client and OpenERP timezone are set correct!
When i log out, the attendence amount is correct.
I fixed this issue by changing the SQL-View hr_timesheet_sheet_sheet_day
that is created in hr_timesheet_sheet_sheet_day.init().
I changed this line:
ELSE ((EXTRACT(hour FROM current_time) * 60) + EXTRACT(minute FROM
current_time)
to following:
ELSE ((EXTRACT(hour FROM current_time) - EXTRACT(timezone_hour from
current_time)) * 60) + EXTRACT(minute FROM current_time)
So, i simply subtract the timezone offset.
I attached my solution as a seperate fix module.
** Affects: openobject-addons
Importance: Undecided
Status: New
** Patch added: "de_brainchild_timesheet_attendance_fix.tar.gz"
https://bugs.launchpad.net/bugs/1215900/+attachment/3784163/+files/de_brainchild_timesheet_attendance_fix.tar.gz
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1215900
Title:
Wrong Attendance timespan displayed in hr_timesheet_sheet
Status in OpenERP Addons (modules):
New
Bug description:
When signing in with the attendance function of the timesheet, it displays a value that is higher by the amount of current timezone offset. For example: Germany has a timezone offset of 2 (at summer time). So when i log in, i should get displayed a attendence time of 00:00 hours, but it displays 02:00 hours. The client and OpenERP timezone are set correct!
When i log out, the attendence amount is correct.
I fixed this issue by changing the SQL-View
hr_timesheet_sheet_sheet_day that is created in
hr_timesheet_sheet_sheet_day.init().
I changed this line:
ELSE ((EXTRACT(hour FROM current_time) * 60) + EXTRACT(minute FROM
current_time)
to following:
ELSE ((EXTRACT(hour FROM current_time) - EXTRACT(timezone_hour from
current_time)) * 60) + EXTRACT(minute FROM current_time)
So, i simply subtract the timezone offset.
I attached my solution as a seperate fix module.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1215900/+subscriptions
Follow ups
References