Skip to Content
Menu
This question has been flagged
1 Reply
10162 Views

2018-02-14 13:16:05,206 12476 ERROR steeve400db odoo.http: Exception during JSON request handling.

Traceback (most recent call last):

File "/home/stephen/odoo/odoo11.0/odoo/fields.py", line 947, in __get__

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

File "/home/stephen/odoo/odoo11.0/odoo/api.py", line 960, in get

value = self._data[field][record.id][key]

KeyError: <odoo.api.Environment object at 0x7fcf14fafb70>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/stephen/odoo/odoo11.0/odoo/http.py", line 647, in _handle_exception

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

File "/home/stephen/odoo/odoo11.0/odoo/http.py", line 307, in _handle_exception

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

File "/home/stephen/odoo/odoo11.0/odoo/tools/pycompat.py", line 87, in reraise

raise value

File "/home/stephen/odoo/odoo11.0/odoo/http.py", line 689, in dispatch

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

File "/home/stephen/odoo/odoo11.0/odoo/http.py", line 339, in _call_function

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

File "/home/stephen/odoo/odoo11.0/odoo/service/model.py", line 97, in wrapper

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

File "/home/stephen/odoo/odoo11.0/odoo/http.py", line 332, in checked_call

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

File "/home/stephen/odoo/odoo11.0/odoo/http.py", line 933, in __call__

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

File "/home/stephen/odoo/odoo11.0/odoo/http.py", line 512, in response_wrap

response = f(*args, **kw)

File "/home/stephen/odoo/odoo11.0/addons/web/controllers/main.py", line 1206, in load

action = request.env[action_type].browse([action_id]).read()

File "/home/stephen/odoo/odoo11.0/odoo/addons/base/ir/ir_actions.py", line 197, in read

result = super(IrActionsActWindow, self).read(fields, load=load)

File "/home/stephen/odoo/odoo11.0/odoo/models.py", line 2520, in read

values[name] = field.convert_to_read(record[name], record, use_name_get)

File "/home/stephen/odoo/odoo11.0/odoo/models.py", line 4659, in __getitem__

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

File "/home/stephen/odoo/odoo11.0/odoo/fields.py", line 951, in __get__

self.determine_value(record)

File "/home/stephen/odoo/odoo11.0/odoo/fields.py", line 1062, in determine_value

self.compute_value(recs)

File "/home/stephen/odoo/odoo11.0/odoo/fields.py", line 1018, in compute_value

self._compute_value(records)

File "/home/stephen/odoo/odoo11.0/odoo/fields.py", line 1009, in _compute_value

getattr(records, self.compute)()

File "/home/stephen/odoo/odoo11.0/odoo/addons/base/ir/ir_actions.py", line 157, in _compute_search_view

fvg = self.env[act.res_model].fields_view_get(act.search_view_id.id, 'search')

File "/home/stephen/odoo/odoo11.0/odoo/api.py", line 760, in __getitem__

return self.registry[model_name]._browse((), self)

File "/home/stephen/odoo/odoo11.0/odoo/modules/registry.py", line 181, in __getitem__

return self.models[model_name]

KeyError: 'openaccademy.course'

i dont know what to do inorder to fix this

Avatar
Discard
Best Answer

Hi Stephen,

This issue is shown by Odoo when it cannot find a model (or a field). Judging by your traceback you're calling openaccademy.course somewhere, while it should be openacademy.course.
If you want us to help you further then please do add all the code from your custom module to your initial question.

Regards,
Yenthe

Avatar
Discard

When I added "dependency" in the manifest in odoo I got this error
I wanted to do a one2many relationship