This commit is contained in:
odex 2024-07-10 15:05:13 +03:00
parent ca7799f29e
commit a7b4176a90
1 changed files with 3 additions and 3 deletions

View File

@ -92,13 +92,13 @@ class LeaveController(http.Controller):
[('state', 'in', ['confirm','validate','approved']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')], [('state', 'in', ['confirm','validate','approved']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')],
offset=offset, limit=limit) offset=offset, limit=limit)
count = http.request.env['hr.holidays'].search_count( 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: if done:
holidays = http.request.env['hr.holidays'].search( 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) offset=offset, limit=limit)
count = http.request.env['hr.holidays'].search_count( 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: else:
holidays = http.request.env['hr.holidays'].search( holidays = http.request.env['hr.holidays'].search(
[('employee_id', '=', employee.id), ('type', '=', 'remove')], offset=offset, limit=limit) [('employee_id', '=', employee.id), ('type', '=', 'remove')], offset=offset, limit=limit)