From a7b4176a907acd77567b7cb39f4667933a4f086b Mon Sep 17 00:00:00 2001 From: odex Date: Wed, 10 Jul 2024 15:05:13 +0300 Subject: [PATCH] fix api --- odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py index a8ded7c56..8a4e00eee 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py @@ -92,13 +92,13 @@ class LeaveController(http.Controller): [('state', 'in', ['confirm','validate','approved']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')], offset=offset, limit=limit) count = http.request.env['hr.holidays'].search_count( - [('state', 'not in', ['confirm','validate','approved']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')],) + [('state', 'in', ['confirm','validate','approved']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')],) if done: holidays = http.request.env['hr.holidays'].search( - [('state', 'not in', ['validate1','refuse','cancel']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')], + [('state', 'in', ['validate1','refuse','cancel']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')], offset=offset, limit=limit) count = http.request.env['hr.holidays'].search_count( - [('state', 'not in', ['validate1','refuse','cancel']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')],) + [('state', 'in', ['validate1','refuse','cancel']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')],) else: holidays = http.request.env['hr.holidays'].search( [('employee_id', '=', employee.id), ('type', '=', 'remove')], offset=offset, limit=limit)