Получите keyerror при обновлении модели в odoo 10 - PullRequest
0 голосов
/ 04 июня 2018

Когда я обновляю модуль настройки продаж, то получаю ошибку ниже.И через несколько секунд сервер восстанавливается и обновляется.Но после каждого запуска сервера возникает следующая ошибка при обновлении модуля.Итак, как найти ошибку в модуле и что?

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'
...