diff --git a/yuthon_hr_attendance/controllers/portal.py b/yuthon_hr_attendance/controllers/portal.py index 5e11248db..7cf40516f 100644 --- a/yuthon_hr_attendance/controllers/portal.py +++ b/yuthon_hr_attendance/controllers/portal.py @@ -53,7 +53,8 @@ class CustomerPortal(portal.CustomerPortal): @http.route('/phone/vacation/self', type='http', auth="none", csrf=False, cors='*') def phone_vacation_self(self, **kw): - records = request.env['yuthon.vacation.reports'].sudo().search([('employee_id.id', '=', kw.get('employee_id'))]) + emp_id = request.env['res.users'].sudo().search([('id', '=', int(kw.get('users_id')))]) + records = request.env['yuthon.vacation.reports'].sudo().search([('employee_id.id', '=', emp_id.employee_id.id)]) data = {} for record in records: year = record.vacation_date.year