在我从Apps的特定模块中单击升级选项后,我已注销,现在只能看到数据库选择器页面。如果我选择数据库,它将为我提供
内部服务器错误
服务器遇到内部错误,无法完成您的请求。服务器过载或应用程序错误。
我认为我的上一个代码有问题,但是不知道该在哪里或如何解决此问题并再次登录。这是回溯,
Traceback (most recent call last):
File "/opt/odoo/odoo/modules/registry.py", line 60, in __new__
return cls.registries[db_name]
File "/opt/odoo/odoo/tools/func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "/opt/odoo/odoo/tools/lru.py", line 44, in __getitem__
a = self.d[obj].me
KeyError: 'bio'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo/modules/loading.py", line 424, in load_modules
registry.setup_models(cr)
File "/opt/odoo/odoo/modules/registry.py", line 267, in setup_models
model._setup_fields()
File "/opt/odoo/odoo/models.py", line 2609, in _setup_fields
field.setup_full(self)
File "/opt/odoo/odoo/fields.py", line 482, in setup_full
self._setup_regular_full(model)
File "/opt/odoo/odoo/fields.py", line 2389, in _setup_regular_full
invf = comodel._fields[self.inverse_name]
KeyError: 'id '
2019-06-10 06:07:46,066 3151 INFO bio werkzeug: 127.0.0.1 - - [10/Jun/2019 06:07:46] "GET /web?db=bio HTTP/1.1" 500 - 11 0.014 0.340
2019-06-10 06:07:46,073 3151 ERROR bio werkzeug: Error on request:
Traceback (most recent call last):
File "/opt/odoo/odoo/modules/registry.py", line 60, in __new__
return cls.registries[db_name]
File "/opt/odoo/odoo/tools/func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "/opt/odoo/odoo/tools/lru.py", line 44, in __getitem__
a = self.d[obj].me
KeyError: 'bio'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 303, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 291, in execute
application_iter = app(environ, start_response)
File "/opt/odoo/odoo/service/server.py", line 409, in app
return self.app(e, s)
File "/opt/odoo/odoo/service/wsgi_server.py", line 128, in application
return application_unproxied(environ, start_response)
File "/opt/odoo/odoo/service/wsgi_server.py", line 117, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/opt/odoo/odoo/http.py", line 1318, in __call__
return self.dispatch(environ, start_response)
File "/opt/odoo/odoo/http.py", line 1291, in __call__
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/middleware/shared_data.py", line 227, in __call__
return self.app(environ, start_response)
File "/opt/odoo/odoo/http.py", line 1469, in dispatch
odoo.registry(db).check_signaling()
File "/opt/odoo/odoo/__init__.py", line 98, in registry
return modules.registry.Registry(database_name)
File "/opt/odoo/odoo/modules/registry.py", line 62, in __new__
return cls.new(db_name)
File "/opt/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo/modules/loading.py", line 424, in load_modules
registry.setup_models(cr)
File "/opt/odoo/odoo/modules/registry.py", line 267, in setup_models
model._setup_fields()
File "/opt/odoo/odoo/models.py", line 2609, in _setup_fields
field.setup_full(self)
File "/opt/odoo/odoo/fields.py", line 482, in setup_full
self._setup_regular_full(model)
File "/opt/odoo/odoo/fields.py", line 2389, in _setup_regular_full
invf = comodel._fields[self.inverse_name]
KeyError: 'id ' - - -
我正在使用Odoo 12 CE。我该如何解决?
编辑 这是我尝试升级的模块中的mdoel(我所做的最后一次更改)。
class proddetail(models.Model):
_name = 'vendr.proddetail'
name = models.Char(related='rel_product_template.name')
numb = models.Char(string='No')
area = models.Char(string='Area')
production = models.Char(string='Production')
prev_yr = models.Char(string='Previous Year')
curr_yr = models.Char(string='Current Year')
答案 0 :(得分:0)
经过两个小时的学习后,发现我不小心放了一个空格,将其删除即可解决问题!
有错误的行:
samplet = fields.One2many('tests.sampletest','id',string="Sample test details")
id后面立即有一个空格。 tests.sampletest是同一模块中的另一个模型(不是我尝试更新的模型)。