Comment 3 for bug 1067727

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!