Skip to Content
Menu
This question has been flagged
2 Replies
2211 Views

When try to create leave for an employee it give error below

Traceback (most recent call last):
  File "/maawia0/maawia0-server/odoo/http.py", line 642, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/maawia0/maawia0-server/odoo/http.py", line 684, in dispatch
    result = self._call_function(**self.params)
  File "/maawia0/maawia0-server/odoo/http.py", line 334, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/maawia0/maawia0-server/odoo/service/model.py", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/maawia0/maawia0-server/odoo/http.py", line 327, in checked_call
    result = self.endpoint(*a, **kw)
  File "/maawia0/maawia0-server/odoo/http.py", line 942, in __call__
    return self.method(*args, **kw)
  File "/maawia0/maawia0-server/odoo/http.py", line 507, in response_wrap
    response = f(*args, **kw)
  File "/maawia0/maawia0-server/addons/web/controllers/main.py", line 895, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/maawia0/maawia0-server/addons/web/controllers/main.py", line 887, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/maawia0/maawia0-server/odoo/api.py", line 687, in call_kw
    return call_kw_model(method, model, args, kwargs)
  File "/maawia0/maawia0-server/odoo/api.py", line 672, in call_kw_model
    result = method(recs, *args, **kwargs)
  File "/maawia0/maawia0-server/odoo/models.py", line 1122, in default_get
    defaults[name] = field.default(self)
  File "/maawia0/maawia0-server/addons/hr_holidays_multi_levels_approval/models/holidays.py", line 21, in _default_approver
    if employee.holidays_approvers:
AttributeError: 'int' object has no attribute 'holidays_approvers'
Avatar
Discard
Author Best Answer


Avatar
Discard
Best Answer

Hi,

It seems the error is coming from a third party module that you are using, module name is hr_holidays_multi_levels_approval , so please cross check the code you have added and fix accordingly.

Here in the employee variable it is expecting recordset but it is coming a employee id.

Thanks

Avatar
Discard
Related Posts Replies Views Activity
2
Sep 17
5471
0
Jan 23
1656
8
Dec 23
18266
1
Mar 15
3195
1
Dec 24
22