Attendances not linked to timesheet on last day of the month

Bug #394033 reported by Jean-Paul
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Jay Vora (Serpent Consulting Services)

Bug Description

OpenERP 4.2.3.4 module hr.

When an employee signs in or out on the last day of the month (e.g. june 30th), the attendance record is not linked to the current timesheet:
- The sign in / sign out actions don't show up on the timesheet
- Amount of time present is not shown on the timesheet
- The attenance itself is in the database, but has no timesheet linked to it (Human Resources / Attendances / Attendances, open an Attendance created on the last day of the month, the field Sheet is empty)

Tags: attendances hr
Changed in openobject-server:
status: New → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Jean-Paul,

Can you please try to apply this patch and tell us the result?

Thanks.

Changed in openobject-server:
assignee: nobody → Jay (Open ERP) (jvo-openerp)
status: Confirmed → In Progress
affects: openobject-server → openobject-addons
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Fixed in revision no. 48 revision-id: <email address hidden> .
Thank you for reporting.

Changed in openobject-addons:
status: In Progress → Fix Released
Revision history for this message
Jean-Paul (jpvewijk) wrote :

I've applied the patch, had to manually apply the first block because the diff assumes a slightly different original.
Original line 432 according to the patch:
  ON (s.date_to >= date(a.name) \
Original same line 432 in my copy:
 ON (s.date_to >= a.name \
Changed into:
 ON (s.date_to >= a.name::date \
Similar differences in the rest of the first block. The other two blocks were accepted by patch without complaints. Please let me know if I did right to apply the patch manually anyhow.

Sign in/Out still works. Will have to wait until July 31 to see the effect, I don't have a test environment where I can easily change the system date.

Revision history for this message
Jean-Paul (jpvewijk) wrote :

PS: version info from my copy of the patched file:
# $Id: hr_timesheet.py 5490 2007-01-29 16:05:51Z pinky $

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Jean-Paul,

As the attached patch suggests, there are changes on 3 blocks,First block belongs to line 429 onwards, 2nd one to 491 and last one to 604 onwards.

Yes, the patch differs from your code as it seems like you might have not updates the code.

your changes are quite right.

To test and check, you may create a new dummy database and check.

Thank You.

Revision history for this message
Jean-Paul (jpvewijk) wrote :

I've tested the patch by manually adding attendances for June 30th (not via sign in/sign out). They are now correctly linked to the June timesheet. I'm assuming it will work correctly via sign in/sign out too.

Bug may be closed. Thanks!

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.