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

When I attempt to install the Expenses module I receive the below error.


Can anyone advise on how I may resolve this?


Error:
Odoo Server Error

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/tools/cache.py", line 85, in lookup
r = d[key]
File "/home/odoo/src/odoo/odoo/tools/func.py", line 71, in wrapper
return func(self, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: ('ir.model.data', , 'product.cat_expense')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 677, in _tag_root
f(rec)
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 564, in _tag_record
f_val = self.id_get(f_ref)
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 660, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 666, in model_id_get
return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 1927, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "", line 2, in xmlid_lookup
File "/home/odoo/src/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 1920, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: product.cat_expense

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

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/odoo/src/odoo/odoo/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/src/odoo/odoo/http.py", line 359, 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 347, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 912, in __call__
return self.method(*args, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1393, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1381, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 396, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 383, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 475, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 593, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/home/odoo/src/odoo/odoo/modules/registry.py", line 89, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 453, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 346, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 221, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 733, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 799, in convert_xml_import
obj.parse(doc.getroot())
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 719, in parse
self._tag_root(de)
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 677, in _tag_root
f(rec)
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 681, in _tag_root
raise ParseError('while parsing %s:%s, near\n%s' % (
Exception

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

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /home/odoo/src/odoo/addons/hr_expense/data/hr_expense_data.xml:4, near

Expenses
0.0
1.0
service



Avatar
Discard
Best Answer

Hi,

Can you pull the latest code of your odoo version and try installing the module again. Also try installing the module in a fresh database and see whether you have error there or not.

Thanks

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 24
1454
2
Jan 24
2397
1
Feb 23
863
1
Aug 24
2368
1
Aug 19
3623