hr_attendance_analysis : context timezone, weekday, recursive split ...

Bug #1067727 reported by Fabrizio Lovison
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Domsense Agile BG OpenERP Addons
Fix Released
Undecided
Unassigned

Bug Description

OpenERP 6.1 :

a. Attendance in 6.1 are in UTC time saved, resource calendar in localtime.
   Patch in attach translate attendance in localtime to compare with resource worktime calendar.

b. Weekday() method return a integer, dayofweek in resource_calendar_attendance is a single character.

c. Split attendance with recursive method throw exception with large attendance time.
   Patch introduces a simple iterative method.

Revision history for this message
Fabrizio Lovison (fabriz) wrote :
description: updated
Revision history for this message
Lorenzo Battistini (elbati) wrote :

Ciao Fabrizio,
can you provide some test case whereby we can reproduce wrong behaviours?
Thanks!

Changed in domsense-agilebg-addons:
status: New → Incomplete
Revision history for this message
Fabrizio Lovison (fabriz) wrote :

Ciao Lorenzo!
I attached dump of HRTest db for OpenERP 6.1 with hr_attendance_analysis installed.
Working hours for "Administrator" employee are 8-12 / 14-18 for monday and tuesday.
Administrator sign-in monday 29.10.2012 at 08:05:00 and sign-out at 12:08:24,
the result in attendance analysis menu is :

ATTENDANCE DURATION = 04:03
OVERTIME = 04:03
DURATION WITHIN WORKING SCHEDULE = 00:00

Monday with weekday is 0 value, but we must search '0', not 0 with ORM.
If you sign in/out on tuesday, you obtain result with 1/2 hour displacement for local time,
with overtime of 1/2 hour (!! already, yesterday there was the time change) ...

If you remove all attendances and insert a new sign-in on day different from today (es. 28/10),
OpenERP throw a exception for maximum recursion depth on stack.
For a function that simple, better to use an iterative algorithm ;-)
Thanks!

Revision history for this message
Lorenzo Battistini (elbati) wrote :

Ciao Fabrizio,
your patch has been committed.
Thanks!

Changed in domsense-agilebg-addons:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.