我在OpenERP中升级模块时生成错误
res_model not found error
错误:
客户端跟踪(最近一次呼叫最后一次):
File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params)
File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 993, in load
menu_root_ids = self.get_user_roots(req)
File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 979, in get_user_roots
return Menus.search(menu_domain, 0, False, False, req.context) File "/opt/openerp/server/openerp/addons/web/session.py", line 42, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
服务器跟踪(最近一次呼叫最后一次):
File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/opt/openerp/server/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/server/openerp/addons/mail/mail_group_menu.py", line 44, in search
ids = super(ir_ui_menu, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=False)
File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_menu.py", line 127, in search
result = self._filter_visible_menus(cr, uid, ids, context=context)
File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_menu.py", line 103, in _filter_visible_menus
if not menu.child_id:
File "/opt/openerp/server/openerp/osv/orm.py", line 497, in __getattr__
return self[name]
File "/opt/openerp/server/openerp/osv/orm.py", line 405, in __getitem__
field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
File "/opt/openerp/server/openerp/osv/orm.py", line 3621, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/opt/openerp/server/openerp/osv/orm.py", line 3742, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
File "/opt/openerp/server/openerp/osv/fields.py", line 538, in get
ids2 = obj.pool.get(self._obj).search(cr, user, domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
File "/opt/openerp/server/openerp/addons/mail/mail_group_menu.py", line 44, in search
ids = super(ir_ui_menu, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=False)
File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_menu.py", line 127, in search
result = self._filter_visible_menus(cr, uid, ids, context=context)
File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_menu.py", line 103, in _filter_visible_menus
if not menu.child_id:
File "/opt/openerp/server/openerp/osv/orm.py", line 499, in __getattr__
raise AttributeError(e)
AttributeError: 'Field res_model not found in browse_record(ir.actions.act_window, 494)'
答案 0 :(得分:0)
这是一个相当含糊的问题。
什么版本的openERP存在问题?
在OE7中,只有ir_act_window有res_model,我甚至看不到你提供的模型(ir.actions.act_window)。在OE8中也是如此。
如果您可以指定要进行的操作,这是您的模块/扩展吗?这会有很大的帮助。
答案 1 :(得分:0)
在我的情况下,我删除了一个创建了菜单项的xml文件。由于我删除了文件,菜单项正在搜索它并且它正在抛出错误。所以最后我通过删除了菜单项。