From 2e038cc6bd50fdf51eaa3e3788feb524145cf36d Mon Sep 17 00:00:00 2001 From: Prakash Prajapati Date: Thu, 19 Oct 2017 14:24:58 +0200 Subject: [PATCH] [IMP] hr_attendance: allow to search for "signed in/out" employees --- addons/hr_attendance/models/hr_employee.py | 2 +- addons/hr_attendance/views/hr_employee_view.xml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/addons/hr_attendance/models/hr_employee.py b/addons/hr_attendance/models/hr_employee.py index 7e224328003..7eab0eedf64 100644 --- a/addons/hr_attendance/models/hr_employee.py +++ b/addons/hr_attendance/models/hr_employee.py @@ -24,7 +24,7 @@ class HrEmployee(models.Model): pin = fields.Char(string="PIN", default=_default_random_pin, help="PIN used to Check In/Out in Kiosk Mode (if enabled in Configuration).", copy=False) attendance_ids = fields.One2many('hr.attendance', 'employee_id', help='list of attendances for the employee') - last_attendance_id = fields.Many2one('hr.attendance', compute='_compute_last_attendance_id') + last_attendance_id = fields.Many2one('hr.attendance', compute='_compute_last_attendance_id', store=True) attendance_state = fields.Selection(string="Attendance", compute='_compute_attendance_state', selection=[('checked_out', "Checked out"), ('checked_in', "Checked in")]) manual_attendance = fields.Boolean(string='Manual Attendance', compute='_compute_manual_attendance', inverse='_inverse_manual_attendance', help='The employee will have access to the "My Attendances" menu to check in and out from his session') diff --git a/addons/hr_attendance/views/hr_employee_view.xml b/addons/hr_attendance/views/hr_employee_view.xml index b187f370f60..4c96bfe13d5 100644 --- a/addons/hr_attendance/views/hr_employee_view.xml +++ b/addons/hr_attendance/views/hr_employee_view.xml @@ -29,6 +29,19 @@ + + + hr.employee.filter.inherit.attendance + hr.employee + + + + + + + + + hr.employee.kanban