Skip to Content
Menu
This question has been flagged
5 Replies
7932 Views

Hello everyone!


When trying to open an employee card in Employee app, I am getting the error below. Could you plea give me some pointers how could I fix this.

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/home/odoo/src/odoo/odoo/api.py", line 745, in get

    value = self._data[field][record._ids[0]]

KeyError: 2


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/odoo/src/odoo/odoo/fields.py", line 996, in __get__

    value = env.cache.get(record, self)

  File "/home/odoo/src/odoo/odoo/api.py", line 751, in get

    raise CacheMiss(record, field)

odoo.exceptions.CacheMiss: ('hr.employee.public(2,).company_id', None)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/odoo/src/odoo/odoo/http.py", line 624, in _handle_exception

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

  File "/home/odoo/src/odoo/odoo/http.py", line 310, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/home/odoo/src/odoo/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/home/odoo/src/odoo/odoo/http.py", line 669, in dispatch

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

  File "/home/odoo/src/odoo/odoo/http.py", line 350, in _call_function

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

  File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper

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

  File "/home/odoo/src/odoo/odoo/http.py", line 339, in checked_call

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

  File "/home/odoo/src/odoo/odoo/http.py", line 915, in __call__

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

  File "/home/odoo/src/odoo/odoo/http.py", line 515, in response_wrap

    response = f(*args, **kw)

  File "/home/odoo/src/odoo/addons/hr_org_chart/controllers/hr_org_chart.py", line 55, in get_org_chart

    employee = self._check_employee(employee_id, **kw)

  File "/home/odoo/src/odoo/addons/hr_org_chart/controllers/hr_org_chart.py", line 27, in _check_employee

    Employee.browse(employee_id).check_access_rule('read')

  File "/home/odoo/src/odoo/odoo/models.py", line 3228, in check_access_rule

    invalid = self - self._filter_access_rules_python(operation)

  File "/home/odoo/src/odoo/odoo/models.py", line 3297, in _filter_access_rules_python

    return self.sudo().filtered_domain(dom or [])

  File "/home/odoo/src/odoo/odoo/models.py", line 5276, in filtered_domain

    data = rec.mapped(key)

  File "/home/odoo/src/odoo/odoo/models.py", line 5206, in mapped

    recs = recs._mapped_func(operator.itemgetter(name))

  File "/home/odoo/src/odoo/odoo/models.py", line 5165, in _mapped_func

    vals = [func(rec) for rec in self]

  File "/home/odoo/src/odoo/odoo/models.py", line 5165, in <listcomp>

    vals = [func(rec) for rec in self]

  File "/home/odoo/src/odoo/odoo/models.py", line 5610, in __getitem__

    return self._fields[key].__get__(self, type(self))

  File "/home/odoo/src/odoo/odoo/fields.py", line 2307, in __get__

    return super().__get__(records, owner)

  File "/home/odoo/src/odoo/odoo/fields.py", line 1003, in __get__

    recs._fetch_field(self)

  File "/home/odoo/src/odoo/odoo/models.py", line 2944, in _fetch_field

    self._read(fnames)

  File "/home/odoo/src/odoo/odoo/models.py", line 3016, in _read

    cr.execute(query_str, params)

  File "/home/odoo/src/odoo/odoo/sql_db.py", line 164, in wrapper

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

  File "/home/odoo/src/odoo/odoo/sql_db.py", line 241, in execute

    res = self._obj.execute(query, params)

psycopg2.ProgrammingError: column hr_employee_public.timesheet_manager_id does not exist

LINE 1: ...id","hr_employee_public"."coach_id" as "coach_id","hr_employ...

                                                             ^

Avatar
Discard
Best Answer

Hi which version of odoo you'r using please ?

Try those solutions 

-1 : check if you have added some new field if then comment it and reload your page and go to your apps module and remove the comment and upgrade your module 

-2 : Check your postgres server and restart it and retart odoo session .

Hope this will help!

Avatar
Discard
Author

Odoo.sh Version 13

have you try the solution that i mentioned

Author

Thank you very much Imad!

I first just upgraded the module and this was enough to fix it :D. Too easy to figure it out myself :D.

It's a pleasure

Thank you

Related Posts Replies Views Activity
3
Sep 24
18088
1
Sep 24
1635
0
Sep 24
307
0
Sep 24
133
0
Sep 24
154