Hi,
I tried installing the free Hotel Management app (by Cybrosys) on Odoo18 Community Edition (with all dependencies met) on request of one of my clients. However, I got the following error, saying the following - looking for the category_id:
Occured on mycompany.com on model ir.module.module and id 12 on 2025-02-27 16:38:43 GMT
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1962, in _transactioning
return service_model.retrying(func, env=self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 137, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1929, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 2177, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
result = endpoint(**request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 40, in call_button
action = call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "<decorator-gen-79>", line 2, in button_immediate_install
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 75, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 480, in button_immediate_install
return self._button_immediate_function(self.env.registry[self._name].button_install)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 604, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "<decorator-gen-13>", line 2, in new
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 97, in locked
return func(inst, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 127, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 480, in load_modules
processed_modules += load_marked_modules(env, graph,
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 364, in load_marked_modules
loaded, processed = load_module_graph(
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 204, in load_module_graph
registry.setup_models(env.cr)
File "<decorator-gen-16>", line 2, in setup_models
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 97, in locked
return func(inst, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 351, in setup_models
model._setup_fields()
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3675, in _setup_fields
field.setup(self)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 539, in setup
self.setup_nonrelated(model)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 4585, in setup_nonrelated
invf = comodel._fields[self.inverse_name]
KeyError: 'category_id'
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPCError@https://mycompany.com/web/assets/debug/web.assets_web.js:29740:9
makeErrorFromResponse@https://mycompany.com/web/assets/debug/web.assets_web.js:29763:19
rpc._rpc/promise</<@https://mycompany.com/web/assets/debug/web.assets_web.js:29817:48
How can I correct this?
Thank you
Hi do you know which model that called this 'category_id'. Can you try to print the name of the comodel and see if you have other modules that trigger this.
I think you can trace it this way. I don't have enough clues if only based on this error log to help you.