跳至内容
菜单
此问题已终结
1 回复
1220 查看
Traceback (most recent call last):
  File "/opt/odoo16/odoo/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "", line 2, in __getitem__
  File "/opt/odoo16/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/opt/odoo16/odoo/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: ('ir.model.data', , 'gb_business_trip.gb_business_trip_report_view')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo16/odoo/odoo/tools/convert.py", line 698, in _tag_root
    f(rec)
  File "/opt/odoo16/odoo/odoo/tools/convert.py", line 568, in _tag_record
    f_val = self.id_get(f_ref, raise_if_not_found=nodeattr2bool(rec, 'forcecreate', True))
  File "/opt/odoo16/odoo/odoo/tools/convert.py", line 681, in id_get
    res = self.model_id_get(id_str, raise_if_not_found)
  File "/opt/odoo16/odoo/odoo/tools/convert.py", line 687, 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 "/opt/odoo16/odoo/odoo/addons/base/models/ir_model.py", line 2039, in _xmlid_to_res_model_res_id
    return self._xmlid_lookup(xmlid)[1:3]
  File "", line 2, in _xmlid_lookup
  File "/opt/odoo16/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo16/odoo/odoo/addons/base/models/ir_model.py", line 2032, in _xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: gb_business_trip.gb_business_trip_report_view

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

Traceback (most recent call last):
  File "/opt/odoo16/odoo/odoo/http.py", line 1589, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo16/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo16/odoo/odoo/http.py", line 1616, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo16/odoo/odoo/http.py", line 1820, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo16/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo16/odoo/odoo/http.py", line 697, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo16/odoo/addons/web/controllers/dataset.py", line 46, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo16/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo16/odoo/odoo/api.py", line 466, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo16/odoo/odoo/api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "", line 2, in button_immediate_upgrade
  File "/opt/odoo16/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
    return method(self, *args, **kwargs)
  File "/opt/odoo16/odoo/odoo/addons/base/models/ir_module.py", line 659, in button_immediate_upgrade
    return self._button_immediate_function(type(self).button_upgrade)
  File "/opt/odoo16/odoo/odoo/addons/base/models/ir_module.py", line 592, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "", line 2, in new
  File "/opt/odoo16/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/opt/odoo16/odoo/odoo/modules/registry.py", line 90, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/opt/odoo16/odoo/odoo/modules/loading.py", line 486, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check)
  File "/opt/odoo16/odoo/odoo/modules/loading.py", line 374, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/opt/odoo16/odoo/odoo/modules/loading.py", line 231, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package)
  File "/opt/odoo16/odoo/odoo/modules/loading.py", line 71, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
  File "/opt/odoo16/odoo/odoo/tools/convert.py", line 763, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate)
  File "/opt/odoo16/odoo/odoo/tools/convert.py", line 829, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/odoo16/odoo/odoo/tools/convert.py", line 749, in parse
    self._tag_root(de)
  File "/opt/odoo16/odoo/odoo/tools/convert.py", line 698, in _tag_root
    f(rec)
  File "/opt/odoo16/odoo/odoo/tools/convert.py", line 715, in _tag_root
    )) from e
odoo.tools.convert.ParseError: while parsing /opt/odoo16/odoo/addons/gb_business_trip/views/business_trip_views.xml:84, somewhere inside

            gb_business_trip.gb_business_trip_report_view
            ir.ui.view
            
        


形象
丢弃
最佳答案

Hi, 
The error commonly occurs when Odoo encounters difficulty in finding a specific item, such as the ID of a view or a model associated with that view. Specifically, the reported error indicates that Odoo is attempting to locate an external ID (e.g., gb_business_trip.gb_business_trip_report_view), but it is unable to locate it within the system. Extracting detailed information from the log can be challenging, but to address this issue, consider taking the following steps:

1. Verify that the model you are using is listed in the security file. Ensure that the security file is uncommented in the manifest file.

2. Check the sequence of XML files in the manifest file. If an XML file depends on another XML file, ensure that the dependent XML file is listed below the one it relies on. This ensures that Odoo processes the files in the correct order.


Hope it helps

形象
丢弃