Merge lp:~elbati/hr-timesheet/7.0_fix_action_attendances into lp:~hr-core-editors/hr-timesheet/7.0

Proposed by Lorenzo Battistini
Status: Merged
Merged at revision: 51
Proposed branch: lp:~elbati/hr-timesheet/7.0_fix_action_attendances
Merge into: lp:~hr-core-editors/hr-timesheet/7.0
Diff against target: 14 lines (+3/-1)
1 file modified
hr_attendance_analysis/hr_attendance.py (+3/-1)
To merge this branch: bzr merge lp:~elbati/hr-timesheet/7.0_fix_action_attendances
Reviewer Review Type Date Requested Status
Stéphane Bidoul (Acsone) (community) code review Approve
Guewen Baconnier @ Camptocamp Approve
Review via email: mp+174933@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

LGTM

review: Approve
Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :

LGTM

review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_attendance_analysis/hr_attendance.py'
2--- hr_attendance_analysis/hr_attendance.py 2013-05-31 10:15:39 +0000
3+++ hr_attendance_analysis/hr_attendance.py 2013-07-16 07:23:34 +0000
4@@ -371,7 +371,9 @@
5 elif attendance.action == 'sign_out':
6 previous_attendance_ids = self.search(cr, uid, [
7 ('employee_id', '=', attendance.employee_id.id),
8- ('name', '<', attendance.name)], order='name')
9+ ('name', '<', attendance.name),
10+ ('action', '=', 'sign_in'),
11+ ], order='name')
12 if previous_attendance_ids and previous_attendance_ids[len(previous_attendance_ids) - 1] not in attendance_ids:
13 attendance_ids.append(previous_attendance_ids[len(previous_attendance_ids) - 1])
14 return attendance_ids

Subscribers

People subscribed via source and target branches