数据库架构已更改;现在,odoo将无法运行 [英] Database schema changed; now odoo won't run

查看:477
本文介绍了数据库架构已更改;现在,odoo将无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我要启动Odoo我的本地服务器(本地主机)时遇到问题.

I have a problem when I want to start Odoo my local server (localhost).

发生了什么事,因为我不再需要数据库了,所以我对数据库进行了更改并删除了一个字段.但是该字段位于树状视图中,因为该视图找不到我删除的字段,所以我无法启动服务器.

What happens is I made a change in the database and deleted a field because i didn't need it anymore. But the field was in a tree view and I cannot start the server because the view does not find the field that I removed.

错误如下:

2016-04-20 11:46:10,863 3393 INFO prueba3 werkzeug: 127.0.0.1 - - [20/Apr/2016 11:46:10] "GET /favicon.ico HTTP/1.1" 500 -
2016-04-20 11:46:10,903 3393 ERROR prueba3 werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/opt/odoo9/odoo9/openerp/service/server.py", line 245, in app
    return self.app(e, s)
  File "/opt/odoo9/odoo9/openerp/service/wsgi_server.py", line 184, in application
    return application_unproxied(environ, start_response)
  File "/opt/odoo9/odoo9/openerp/service/wsgi_server.py", line 170, in application_unproxied
    result = handler(environ, start_response)
  File "/opt/odoo9/odoo9/openerp/http.py", line 1488, in __call__
    return self.dispatch(environ, start_response)
  File "/opt/odoo9/odoo9/openerp/http.py", line 1462, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/opt/odoo9/odoo9/openerp/http.py", line 1637, in dispatch
    ir_http = request.registry['ir.http']
  File "/opt/odoo9/odoo9/openerp/http.py", line 360, in registry
    return openerp.modules.registry.RegistryManager.get(self.db) if self.db else None
  File "/opt/odoo9/odoo9/openerp/modules/registry.py", line 355, in get
    update_module)
  File "/opt/odoo9/odoo9/openerp/modules/registry.py", line 386, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo9/odoo9/openerp/modules/loading.py", line 340, in load_modules
    registry.setup_models(cr)
  File "/opt/odoo9/odoo9/openerp/modules/registry.py", line 200, in setup_models
    model._setup_fields(cr, SUPERUSER_ID)
  File "/opt/odoo9/odoo9/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo9/odoo9/openerp/api.py", line 354, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo9/odoo9/openerp/models.py", line 3043, in _setup_fields
    field.setup_full(self)
  File "/opt/odoo9/odoo9/openerp/fields.py", line 493, in setup_full
    self._setup_related_full(model)
  File "/opt/odoo9/odoo9/openerp/fields.py", line 1464, in _setup_related_full
    super(Selection, self)._setup_related_full(model)
  File "/opt/odoo9/odoo9/openerp/fields.py", line 530, in _setup_related_full
    field = target._fields[name]
KeyError: u'x_tipo_envase'

消除的字段称为'x_tipo_envase'

The field eliminated is called ' x_tipo_envase '

此错误是致命错误,我无法启动服务器. 该视图通过Odoo GUI进行更改. 我无法修改XML文件.

This error is a fatal error and I can not start the server. The views the change by Odoo GUI. I can not modify the XML files.

如何启动服务器以解决GUI Odoo中的此错误?

How can I start the server to fix this error in the GUI Odoo?

推荐答案

AFAICS并不是服务器启动顺序上的错误,而是在您进入该视图时出现的错误.

AFAICS that's not an error on the server start sequence, the error is when you enter that view.

如果是这样,请激活开发人员模式",进入设置">技术">用户界面">视图",找到有问题的树"视图,然后编辑XML以删除该字段.

If so, activate the Developer Mode, go to Settings > Technical > User Interface > Views, find the offending Tree view, and edit the XML to remove the field.

这篇关于数据库架构已更改;现在,odoo将无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆