我有一个大问题,我不知道如何解决它。
我刚刚安装了Odoo(我真的从GitHub克隆了存储库)。我安装了postgresql 9.3。一切正常:我可以创建新数据库,安装新模块(我自己的模块)......这样就可以了。当我在登录界面中选择已恢复的数据库时,问题就会出现。使用Odoo恢复数据库,它工作正常,我的意思是,它已成功恢复。数据库包含已安装模块的一些数据。我以这种方式启动服务器:./openerp-server -c openerp-server.conf -d open_data -u all,以便从open_data数据库更新模块。我总是得到这个错误(来自控制台,服务器输出):
*
2014-10-14 20:26:36,617 24959 ERROR open_data openerp.addons.base.ir.ir_ui_view: Field `menu_id` does not exist
Error context:
View `res.users.groups`
[view_id: 159, xml_id: base.user_groups_view, model: res.users, parent_id: 156]
2014-10-14 20:26:36,618 24959 CRITICAL open_data openerp.service.server: Failed to initialize database `open_data`.
Traceback (most recent call last):
File "/home/administrator/Documents/Programming/odoo/openerp/service/server.py", line 901, in preload_registries
registry = RegistryManager.new(dbname, update_module=update_module)
File "/home/administrator/Documents/Programming/odoo/openerp/modules/registry.py", line 324, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/administrator/Documents/Programming/odoo/openerp/modules/loading.py", line 304, in load_modules
loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report)
File "/home/administrator/Documents/Programming/odoo/openerp/modules/loading.py", line 182, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/home/administrator/Documents/Programming/odoo/openerp/modules/loading.py", line 118, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/home/administrator/Documents/Programming/odoo/openerp/tools/convert.py", line 899, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/home/administrator/Documents/Programming/odoo/openerp/tools/convert.py", line 985, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/home/administrator/Documents/Programming/odoo/openerp/tools/convert.py", line 851, in parse
self._tags[rec.tag](self.cr, rec, n, mode=mode)
File "/home/administrator/Documents/Programming/odoo/openerp/tools/convert.py", line 765, in _tag_record
id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/addons/base/ir/ir_model.py", line 1052, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/addons/base/res/res_users.py", line 714, in create
self.update_user_groups_view(cr, uid, context)
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/addons/base/res/res_users.py", line 755, in update_user_groups_view
view.write({'arch': xml_content})
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 235, in wrapper
return new_api(self, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 552, in new_api
result = method(self._model, cr, uid, self.ids, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/addons/base/ir/ir_ui_view.py", line 282, in write
context)
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 360, in old_api
result = method(recs, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/models.py", line 3662, in write
self._write(old_vals)
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 235, in wrapper
return new_api(self, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 552, in new_api
result = method(self._model, cr, uid, self.ids, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/models.py", line 3834, in _write
recs._validate_fields(vals)
File "/home/administrator/Documents/Programming/odoo/openerp/api.py", line 235, in wrapper
return new_api(self, *args, **kwargs)
File "/home/administrator/Documents/Programming/odoo/openerp/models.py", line 1295, in _validate_fields
raise ValidationError('\n'.join(errors))
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition
Error details:
Field `menu_id` does not exist
Error context:
View `res.users.groups`
[view_id: 159, xml_id: base.user_groups_view, model: res.users, parent_id: 156]" while parsing /home/administrator/Documents/Programming/odoo/openerp/addons/base/base_data.xml:88, near
<record id="group_portal" model="res.groups">
<field name="name">Portal</field>
<field name="comment">Portal members have specific access rights (such as record rules and restricted menus).
They usually do not belong to the usual OpenERP groups.</field>
</record>
*
这就是所有......服务器停止......好吧,你知道......我有朋友使用我正在使用的完全相同的软件包(嗯,这就是我们的想法),并且他们都运行恢复Odoo中的数据库...那么,问题是什么?我正在使用Linux Mint Maya。
感谢任何帮助或评论。
感谢。
答案 0 :(得分:1)
克隆的git版本中的架构与备份的数据库架构不匹配。升级不仅仅涉及备份,还原到新的odoo版本以及升级模块。这可能涉及或简单,具体取决于您的自定义。 OpenUpgrade是此的良好来源,并提供基本脚本和有关根据您的需求修改它们的信息。