Issue for bi_hr_employee_loan (#1,674)
Status: OPEN
Date: 07/07/2021
Assigned to
Contact
Hanee Patel
hanee.patel@browseinfo.in

Description
Dear Support,



there is error when use department approval, pls check

update already to latest bi_hr_employee_loan-14.0.0.4



Error:

Odoo Server Error



Traceback (most recent call last):

File "/opt/odoo/odoo14-demo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch

result = request.dispatch()

File "/opt/odoo/odoo14-demo/odoo/http.py", line 683, in dispatch

result = self._call_function(**self.params)

File "/opt/odoo/odoo14-demo/odoo/http.py", line 359, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/opt/odoo/odoo14-demo/odoo/service/model.py", line 94, in wrapper

return f(dbname, *args, **kwargs)

File "/opt/odoo/odoo14-demo/odoo/http.py", line 347, in checked_call

result = self.endpoint(*a, **kw)

File "/opt/odoo/odoo14-demo/odoo/http.py", line 912, in __call__

return self.method(*args, **kw)

File "/opt/odoo/odoo14-demo/odoo/http.py", line 531, in response_wrap

response = f(*args, **kw)

File "/opt/odoo/odoo14-demo/odoo/addons/web/controllers/main.py", line 1393, in call_button

action = self._call_kw(model, method, args, kwargs)

File "/opt/odoo/odoo14-demo/odoo/addons/web/controllers/main.py", line 1381, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/opt/odoo/odoo14-demo/odoo/api.py", line 396, in call_kw

result = _call_kw_multi(method, model, args, kwargs)

File "/opt/odoo/odoo14-demo/odoo/api.py", line 383, in _call_kw_multi

result = method(recs, *args, **kwargs)

File "/opt/odoo/odoo14-demo-custom-addons/bi_hr_employee_loan/models/loan_request.py", line 286, in action_department_approve

self.write({'department_employee_id':self.env.user.employee_ids.id })

File "/opt/odoo/odoo14-demo/odoo/fields.py", line 3815, in __get__

raise ValueError("Expected singleton: %s" % record)

Exception



The above exception was the direct cause of the following exception:



Traceback (most recent call last):

File "/opt/odoo/odoo14-demo/odoo/http.py", line 639, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/opt/odoo/odoo14-demo/odoo/http.py", line 315, in _handle_exception

raise exception.with_traceback(None) from new_cause

ValueError: Expected singleton: hr.employee(16, 10, 20)

Message and communication history