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 c54317841..00520d5c1 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/loan.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/loan.py @@ -2,7 +2,6 @@ import werkzeug from odoo import http,tools from odoo.http import request, Response -from odoo.addons.auth_signup.models.res_users import SignupError from odoo.exceptions import UserError import base64 from ...validator import validator @@ -126,9 +125,18 @@ class LoanController(http.Controller): 'months':body['months'], }) if loans: - value = {'id': loans.id, 'code': loans.code, 'expect_amount': loans.emp_expect_amount, 'date': str(loans.date), - 'state_name':loans.state, 'installment_amount': loans.installment_amount, 'state': validator.get_state_name(loans,loans.state), 'months': loans.months, - 'request_type_id':loans.request_type.id, 'request_type_name':loans.request_type.name} + value = { + "id": loans.id, + "code": loans.code, + "expect_amount": loans.emp_expect_amount, + "date": str(loans.date), + "state_name": loans.state, + "installment_amount": loans.installment_amount, + "state": validator.get_state_name(loans, loans.state), + "months": loans.months, + "request_type_id": loans.request_type.id, + "request_type_name": loans.request_type.name, + } lines = [] if loans.deduction_lines: for l in loans.deduction_lines: @@ -271,4 +279,4 @@ class LoanController(http.Controller): except Exception as e: _logger.error(str(e)) message = validator.get_server_error(e, user) - return http_helper.errcode(code=403, message=message) \ No newline at end of file + return http_helper.errcode(code=403, message=message) diff --git a/odex25_mobile/odex_mobile/models/res_users.py b/odex25_mobile/odex_mobile/models/res_users.py index fde67073e..4ad63af00 100644 --- a/odex25_mobile/odex_mobile/models/res_users.py +++ b/odex25_mobile/odex_mobile/models/res_users.py @@ -66,7 +66,7 @@ class Users(models.Model): d["job"] = employee.job_id.name if employee and employee.job_id else None d["employe_id"] = employee.id if employee and employee.id else None d["attendance_status"] = attendance_status if attendance_status else None - + d['is_approve'] = 'group_division_manager' in d.get('groups',[]) res.append(d) return res[0] if single else res diff --git a/odex25_mobile/odex_web_app/__pycache__/__init__.cpython-38.pyc b/odex25_mobile/odex_web_app/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 30dc47f3d..000000000 Binary files a/odex25_mobile/odex_web_app/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/odex25_mobile/odex_web_app/__pycache__/http_helper.cpython-38.pyc b/odex25_mobile/odex_web_app/__pycache__/http_helper.cpython-38.pyc deleted file mode 100644 index 09f0ddcdf..000000000 Binary files a/odex25_mobile/odex_web_app/__pycache__/http_helper.cpython-38.pyc and /dev/null differ diff --git a/odex25_mobile/odex_web_app/__pycache__/validator.cpython-38.pyc b/odex25_mobile/odex_web_app/__pycache__/validator.cpython-38.pyc deleted file mode 100644 index 9f94059b9..000000000 Binary files a/odex25_mobile/odex_web_app/__pycache__/validator.cpython-38.pyc and /dev/null differ diff --git a/odex25_mobile/odex_web_app/controllers/__pycache__/__init__.cpython-38.pyc b/odex25_mobile/odex_web_app/controllers/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 4374fcef9..000000000 Binary files a/odex25_mobile/odex_web_app/controllers/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/odex25_mobile/odex_web_app/controllers/__pycache__/authentication.cpython-38.pyc b/odex25_mobile/odex_web_app/controllers/__pycache__/authentication.cpython-38.pyc deleted file mode 100644 index d5f1a2bd9..000000000 Binary files a/odex25_mobile/odex_web_app/controllers/__pycache__/authentication.cpython-38.pyc and /dev/null differ diff --git a/odex25_mobile/odex_web_app/controllers/__pycache__/web.cpython-38.pyc b/odex25_mobile/odex_web_app/controllers/__pycache__/web.cpython-38.pyc deleted file mode 100644 index 5ddbe49fd..000000000 Binary files a/odex25_mobile/odex_web_app/controllers/__pycache__/web.cpython-38.pyc and /dev/null differ diff --git a/odex25_mobile/odex_web_app/models/__pycache__/__init__.cpython-38.pyc b/odex25_mobile/odex_web_app/models/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index d300be7ae..000000000 Binary files a/odex25_mobile/odex_web_app/models/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/odex25_mobile/odex_web_app/models/__pycache__/attendence_zone_config.cpython-38.pyc b/odex25_mobile/odex_web_app/models/__pycache__/attendence_zone_config.cpython-38.pyc deleted file mode 100644 index 564d9601c..000000000 Binary files a/odex25_mobile/odex_web_app/models/__pycache__/attendence_zone_config.cpython-38.pyc and /dev/null differ diff --git a/odex25_mobile/odex_web_app/models/__pycache__/hr_employee.cpython-38.pyc b/odex25_mobile/odex_web_app/models/__pycache__/hr_employee.cpython-38.pyc deleted file mode 100644 index e3a21c38a..000000000 Binary files a/odex25_mobile/odex_web_app/models/__pycache__/hr_employee.cpython-38.pyc and /dev/null differ diff --git a/odex25_mobile/odex_web_app/models/__pycache__/mail_thread.cpython-38.pyc b/odex25_mobile/odex_web_app/models/__pycache__/mail_thread.cpython-38.pyc deleted file mode 100644 index 87a915c26..000000000 Binary files a/odex25_mobile/odex_web_app/models/__pycache__/mail_thread.cpython-38.pyc and /dev/null differ