diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/employee_other_request.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/employee_other_request.py index f7640f9f5..4b6838852 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/employee_other_request.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/employee_other_request.py @@ -526,7 +526,7 @@ class EmployeeOtherRequestController(http.Controller): page, offset, limit, prev = validator.get_page_pagination(page) domain = [('employee_id', '=', employee.id)] if approvel: - domain=[('state', 'not in', ['approved','refuse']),('employee_id', '!=', employee.id)] + domain=[('state', 'not in', ['approved','refuse','draft']),('employee_id', '!=', employee.id)] elif done: domain = [('state', 'in', ['approved','refuse']), ('employee_id', '!=', employee.id)] if filters_str: diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/loan.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/loan.py index 52d84e07f..fb0bb5df7 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/loan.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/loan.py @@ -41,8 +41,8 @@ class LoanController(http.Controller): loan_advantage = http.request.env['loan.request.type'].search([]) if approvel: # domain = [] - loans = http.request.env['hr.loan.salary.advance'].search([('employee_id', '!=', employee.id),('state', 'not in', ['pay','closed','refused'])], order='date desc', offset=offset, limit=limit) - count = http.request.env['hr.loan.salary.advance'].search_count([('employee_id', '!=', employee.id),('state', 'not in', ['pay','closed','refused'])]) + loans = http.request.env['hr.loan.salary.advance'].search([('employee_id', '!=', employee.id),('state', 'not in', ['pay','closed','refused','draft'])], order='date desc', offset=offset, limit=limit) + count = http.request.env['hr.loan.salary.advance'].search_count([('employee_id', '!=', employee.id),('state', 'not in', ['pay','closed','refused','draft'])]) elif done: loans = http.request.env['hr.loan.salary.advance'].search( [('employee_id', '!=', employee.id), ('state', 'in', ['pay','closed','refused'])], order='date desc', offset=offset,limit=limit) diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/official_mission.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/official_mission.py index 2c4248759..fc89ebdca 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/official_mission.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/official_mission.py @@ -359,7 +359,7 @@ class HrOfficialMissionController(http.Controller): domain = [('employee_id', '=', employee.id)] if approvel: - domain=[('state', 'not in', ['approve','refused']),('employee_id', '!=', employee.id)] + domain=[('state', 'not in', ['approve','refused','draft']),('employee_id', '!=', employee.id)] elif done: domain = [('state', 'in', ['approve','refused']), ('employee_id', '!=', employee.id)] diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/overtime.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/overtime.py index a49581597..828640f2d 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/overtime.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/overtime.py @@ -75,7 +75,7 @@ class OverTimeController(http.Controller): success=False) try: if approvel: - domain = [('state','not in',['refused','validated']),('line_ids_over_time.employee_id', '!=', employee.id)] + domain = [('state','not in',['refused','validated','draft']),('line_ids_over_time.employee_id', '!=', employee.id)] overtime = http.request.env['employee.overtime.request'].search(domain, order='request_date desc', offset=offset, limit=limit) count = http.request.env['employee.overtime.request'].search_count(domain) elif done: diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py index e6527e2e6..0c179c9b7 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py @@ -43,7 +43,7 @@ class PermissionController(http.Controller): count = 0 emp = [] if approvel: - domain = [('state', 'not in', ['approve','refused']), ('employee_id', '!=', employee.id)] + domain = [('state', 'not in', ['approve','refused','draft']), ('employee_id', '!=', employee.id)] permissions = http.request.env['hr.personal.permission'].search(domain, offset=offset, limit=limit) count = http.request.env['hr.personal.permission'].search_count(domain) elif done: