fix some
This commit is contained in:
parent
f008dc18ed
commit
e81d1d68e9
|
|
@ -2,7 +2,6 @@
|
||||||
import werkzeug
|
import werkzeug
|
||||||
from odoo import http,tools
|
from odoo import http,tools
|
||||||
from odoo.http import request, Response
|
from odoo.http import request, Response
|
||||||
from odoo.addons.auth_signup.models.res_users import SignupError
|
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
import base64
|
import base64
|
||||||
from ...validator import validator
|
from ...validator import validator
|
||||||
|
|
@ -126,9 +125,18 @@ class LoanController(http.Controller):
|
||||||
'months':body['months'],
|
'months':body['months'],
|
||||||
})
|
})
|
||||||
if loans:
|
if loans:
|
||||||
value = {'id': loans.id, 'code': loans.code, 'expect_amount': loans.emp_expect_amount, 'date': str(loans.date),
|
value = {
|
||||||
'state_name':loans.state, 'installment_amount': loans.installment_amount, 'state': validator.get_state_name(loans,loans.state), 'months': loans.months,
|
"id": loans.id,
|
||||||
'request_type_id':loans.request_type.id, 'request_type_name':loans.request_type.name}
|
"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 = []
|
lines = []
|
||||||
if loans.deduction_lines:
|
if loans.deduction_lines:
|
||||||
for l in loans.deduction_lines:
|
for l in loans.deduction_lines:
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ class Users(models.Model):
|
||||||
d["job"] = employee.job_id.name if employee and employee.job_id else None
|
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["employe_id"] = employee.id if employee and employee.id else None
|
||||||
d["attendance_status"] = attendance_status if attendance_status 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)
|
res.append(d)
|
||||||
|
|
||||||
return res[0] if single else res
|
return res[0] if single else res
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue