diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py index 643e5d519c9..6afd783323c 100644 --- a/addons/hr_attendance/hr_attendance.py +++ b/addons/hr_attendance/hr_attendance.py @@ -98,6 +98,8 @@ class hr_employee(osv.osv): if context is None: context = {} result = {} + if not ids: + return result for id in ids: result[id] = 'absent' cr.execute('SELECT hr_attendance.action, hr_attendance.employee_id \ @@ -156,4 +158,4 @@ class hr_employee(osv.osv): hr_employee() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: