当我想启动Odoo我的本地服务器(localhost)时遇到问题。
我在数据库中进行了更改并删除了一个字段,因为我不再需要它。但该字段在树视图中,我无法启动服务器,因为视图找不到我删除的字段。
错误如下:
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'
此错误是致命错误,我无法启动服务器。 通过Odoo GUI查看更改。 我无法修改XML文件。
如何在GUI Odoo中启动服务器来修复此错误?
答案 0 :(得分:1)
请完成以下步骤:
现在,如果每件事情都正常,请在 openerp .py中注释评论的观点。 ,重新启动服务器并再次升级模块。
答案 1 :(得分:1)
AFAICS在服务器启动序列中不是错误,输入该视图时会出错。
如果是,请激活开发者模式,转到设置>技术>用户界面>查看,查找有问题的树视图,并编辑XML以删除该字段。
答案 2 :(得分:0)
您可以使用blow命令
运行此服务器./odoo.py -d your_db_name --db-filter=your_db_name -u base
这很好用