在odoo 10中升级模型时获取keyerror

时间:2018-06-04 12:41:03

标签: model odoo odoo-10 keyerror

当我升级自定义销售模块然后获得以下错误。经过几台secord服务器的恢复和升级。但是,在每次启动服务器之后,在模块升级期间发生以下错误。那么,如何在模块中找到错误和什么?

Traceback (most recent call last):
  File "/opt/odoo10/odoo/odoo/http.py", line 640, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo10/odoo/odoo/http.py", line 677, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo10/odoo/odoo/http.py", line 333, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo10/odoo/odoo/service/model.py", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo10/odoo/odoo/http.py", line 326, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo10/odoo/odoo/http.py", line 935, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo10/odoo/odoo/http.py", line 506, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo10/odoo/addons/web/controllers/main.py", line 889, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo10/odoo/addons/web/controllers/main.py", line 877, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo10/odoo/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo10/odoo/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo10/odoo/odoo/addons/base/module/module.py", line 527, in button_immediate_upgrade
    return self._button_immediate_function(type(self).button_upgrade)
  File "/opt/odoo10/odoo/odoo/addons/base/module/module.py", line 484, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/opt/odoo10/odoo/odoo/modules/registry.py", line 82, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo10/odoo/odoo/modules/loading.py", line 335, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/opt/odoo10/odoo/odoo/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/odoo10/odoo/odoo/modules/loading.py", line 136, in load_module_graph
    registry.init_models(cr, model_names, {'module': package.name})
  File "/opt/odoo10/odoo/odoo/modules/registry.py", line 313, in init_models
    model._auto_init()
  File "/opt/odoo10/odoo/odoo/models.py", line 2499, in _auto_init
    comodel = self.env[field.comodel_name]
  File "/opt/odoo10/odoo/odoo/api.py", line 760, in __getitem__
    return self.registry[model_name]._browse((), self)
  File "/opt/odoo10/odoo/odoo/modules/registry.py", line 174, in __getitem__
    return self.models[model_name]
KeyError: 'rental.pack.wizard'

0 个答案:

没有答案