diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-11-02 10:52:55 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-11-02 10:52:55 +0100 |
| commit | 5e055a2afd23bd4e6a29c18c86d1978dcd98fc9f (patch) | |
| tree | 058c2cef359de70f7bbabacaa63446fa189af12e /addons/hr_attendance | |
| parent | 486777654009aa372a21e9d6dd52e8c22173ee16 (diff) | |
| parent | f6ca72b3ce9ecc9007ae5825d2c648e3b26b098e (diff) | |
[MERGE] forward port branch saas-11.4 up to f6ca72b3ce9
Diffstat (limited to 'addons/hr_attendance')
| -rw-r--r-- | addons/hr_attendance/models/hr_attendance.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_attendance/models/hr_attendance.py b/addons/hr_attendance/models/hr_attendance.py index cadccfcf6d0..6b1550438a2 100644 --- a/addons/hr_attendance/models/hr_attendance.py +++ b/addons/hr_attendance/models/hr_attendance.py @@ -77,7 +77,7 @@ class HrAttendance(models.Model): ('employee_id', '=', attendance.employee_id.id), ('check_out', '=', False), ('id', '!=', attendance.id), - ]) + ], order='check_in desc', limit=1) if no_check_out_attendances: raise exceptions.ValidationError(_("Cannot create new attendance record for %(empl_name)s, the employee hasn't checked out since %(datetime)s") % { 'empl_name': attendance.employee_id.name, |
