How to create a many2one field in OpenERP 7 - odoo

There are no docs for OpenERP 7 for this: I am trying to create a field with many2one relation from the webclient. I did the following:
1st step created a model and assigned some fields to it
2nd I created a field and mapped the model from the field and when I append that field in view I have been getting this error
Client Traceback (most recent call last):
File "/opt/openerp/web/addons/web/http.py", line 195, in dispatch
response["result"] = method(self, **self.params)
File "/opt/openerp/web/addons/web/controllers/main.py", line 1085, in call_kw
return self._call_kw(req, model, method, args, kwargs)
File "/opt/openerp/web/addons/web/controllers/main.py", line 1077, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/opt/openerp/web/addons/web/session.py", line 40, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/opt/openerp/web/addons/web/session.py", line 28, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/opt/openerp/web/addons/web/session.py", line 101, in send
raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)
Server Traceback (most recent call last):
File "/opt/openerp/web/addons/web/session.py", line 87, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/opt/openerp/server/openerp/netsvc.py", line 361, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp/server/openerp/service/web_services.py", line 601, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp/server/openerp/osv/osv.py", line 167, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/server/openerp/osv/osv.py", line 121, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/server/openerp/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/server/openerp/osv/osv.py", line 164, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/server/openerp/osv/orm.py", line 2389, in name_search
return self._name_search(cr, user, name, args, operator, context, limit)
File "/opt/openerp/server/openerp/osv/orm.py", line 2420, in _name_search
ids = self._search(cr, user, args, limit=limit, context=context, access_rights_uid=access_rights_uid)
File "/opt/openerp/server/openerp/osv/orm.py", line 4773, in _search
query = self._where_calc(cr, user, args, context=context)
File "/opt/openerp/server/openerp/osv/orm.py", line 4622, in _where_calc
e = expression.expression(cr, user, domain, self, context)
File "/opt/openerp/server/openerp/osv/expression.py", line 371, in __init__
self.parse(cr, uid, distribute_not(normalize(exp)), table, context)
File "/opt/openerp/server/openerp/osv/expression.py", line 468, in parse
raise ValueError("Invalid field %r in domain expression %r" % (left, exp))
ValueError: Invalid field 'x_totalexp' in domain expression ['&', '&', ('x_totalexp', '=', 0), ['id', 'not in', []], ('name', 'ilike', 's')]
Is this a bug or i am doing it wrong

Its working now. I also faced the same problem but after "bzr pull", problem get solved.
Just update your 7.0 addons, web & server.

Related

OpenERP - ValueError: No such external ID currently defined in the system: project.group_project_manager

I am new to OpenERP. I am getting this error while installing Project Management Module.
am not able to find where it went wrong.
Here is the error log:`
K-SOFT ERP Server Error
Client Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/http.py", line 195, in dispatch
response["result"] = method(self, **self.params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/controllers/main.py", line 1083, in call_button
action = self._call_kw(req, model, method, args, {}) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/controllers/main.py", line 1071, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/session.py", line 43, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/session.py", line 31, in proxy_method
result = self.session.send(self.service_name, method, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/session.py", line 104, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/session.py", line 90, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/netsvc.py", line 295, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/service/web_services.py", line 614, in dispatch
res = fn(db, uid, *params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/osv/osv.py", line 188, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {}) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/osv/osv.py", line 198, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/base/module/module.py", line 425, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/base/module/module.py", line 476, in _button_immediate_function
_, pool = pooler.restart_pool(cr.dbname, update_module=True) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/pooler.py", line 39, in restart_pool
registry = RegistryManager.new(db_name, force_demo, status, update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/registry.py", line 214, in new
openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/loading.py", line 347, in load_modules
processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/loading.py", line 258, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/loading.py", line 189, in load_module_graph
load_update_xml(module_name, idref, mode) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/loading.py", line 73, in <lambda>
load_update_xml = lambda *args: _load_data(cr, *args, kind='update_xml') File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/loading.py", line 126, in _load_data
tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 954, in convert_xml_import
obj.parse(doc.getroot()) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 847, in parse
self._tags[rec.tag](self.cr, rec, n) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 652, in _tag_menuitem
group_id = self.id_get(cr, group) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 824, in id_get
res = self.model_id_get(cr, id_str) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 833, in model_id_get
return model_data_obj.get_object_reference(cr, self.uid, mod, id_str) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/cache.py", line 18, in lookup
r = self.lookup(self2, cr, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/cache.py", line 46, in lookup
value = d[key] = self.method(self2, cr, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/base/ir/ir_model.py", line 865, in get_object_reference
data_id = self._get_id(cr, uid, module, xml_id) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/cache.py", line 18, in lookup
r = self.lookup(self2, cr, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/cache.py", line 46, in lookup
value = d[key] = self.method(self2, cr, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/base/ir/ir_model.py", line 858, in _get_id
raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id)) ValueError: No such external ID currently defined in the system: project.group_project_manager
Can I have any suggestions regarding this?

how call function in domain Ono2many field odoo 8

message Error:
TypeError: old_api() takes at least 3 arguments (1 given)
code py:
#api.model
def domain_users(self):
if self.env.user.login=="bendjeddou.o":
domain=[('exp_P','>',0)]
else:
domain=[]
return domain
o2m_materiels fields.One2many('gmat.journaleline','rapJor_ids',string='Materiel',domain=domain_users)
class py:
class Journaleline(models.Model):
_name = 'gmat.journaleline'
_description = 'Detail materiel'
rapJor_ids = fields.Many2one('gmat.rapporjournal',string='num')
exp_P = fields.Float(string='Panne(H)',default=0)
all message error:
Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 544, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 581, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/openerp/http.py", line 317, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/http.py", line 314, in checked_call
return self.endpoint(*a, **kw)
File "/opt/odoo/openerp/http.py", line 810, in __call__
return self.method(*args, **kw)
File "/opt/odoo/openerp/http.py", line 410, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/openerp/addons/web/controllers/main.py", line 944, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/openerp/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 3148, in read
result = BaseModel.read(records, fields, load=load)
File "/opt/odoo/openerp/api.py", line 266, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 3183, in read
self._read_from_database(stored, inherited)
File "/opt/odoo/openerp/api.py", line 266, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 3370, in _read_from_database
res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result)
File "/opt/odoo/openerp/osv/fields.py", line 773, in get
domain = self._domain(obj) if callable(self._domain) else self._domain
File "/opt/odoo/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
TypeError: old_api() takes at least 3 arguments (1 given)
Try this:
# remove the decorator
def domain_users(self):
domain = False
if self.env.user.login=="bendjeddou.o":
domain=[('exp_P','>',0)]
else:
domain=[]
return domain
o2m_materiels = fields.One2many('gmat.journaleline',
'rapJor_ids',
string='Materiel',
domain=lambda self: self.domain_users())
or for less typing
# no need to define method
o2m_materiels = fields.One2many('gmat.journaleline',
'rapJor_ids',
string='Materiel',
domain = lambda self: self.env.user.login == "bendjedou.o" and [('exp_P','>',0)] or [])
EDITS:
ok for some reason i think the signature of the method
must be in old api try this:
# or this
# def domain_users(self, cr, uid, ids, context=None):
def domain_users(self, cr, uid, context=None):
domain = False
user = self.pool.get('res.users').browse(cr, uid, uid, context).
if user.login == "bendjeddou.o":
domain=[('exp_P','>',0)]
else:
domain=[]
return domain
o2m_materiels = fields.One2many('gmat.journaleline',
'rapJor_ids',
string='Materiel',
domain=domain_users)
May because your model is created using osv.Model not model.Model

Bug in Odoo gamification addon

When I create a goal definition with:
computation mode : (Automatic: sum on a field,
Model : Sale Order Line,
Field to Sum : SubTotal)
When I add this goal definition to a challenge and try to start it, I get this traceback:
Client Traceback (most recent call last):
File "/home/openerp/server/openerp/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params)
File "/home/openerp/server/openerp/addons/web/controllers/main.py", line 1132, in call_button
action = self._call_kw(req, model, method, args, {})
File "/home/openerp/server/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/home/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 "/home/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/home/openerp/server/openerp/addons/web/session.py", line 103, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/home/openerp/server/openerp/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/home/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/openerp/server/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/home/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/openerp/server/openerp/osv/osv.py", line 132, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/openerp/server/openerp/osv/osv.py", line 199, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/openerp/server/openerp/addons/gamification/plan.py", line 342, in action_start
return self.generate_goals_from_plan(cr, uid, ids, context=context)
File "/home/openerp/server/openerp/addons/gamification/plan.py", line 439, in generate_goals_from_plan
goal_obj.update(cr, uid, [new_goal_id], context=context)
File "/home/openerp/server/openerp/addons/gamification/goal.py", line 278, in update
new_value = res and res[0][field_name] or 0.0
KeyError: u'price_subtotal'
this is a video that shows the scenario that I did: http://youtu.be/b546xTc1ArY

assign task to multiple users in odoo

in odoo (fromerly openERP) i want to customize Project management module.
currently a task can be assigned to a single user. model code is:
class task(osv.osv):
_name = "project.task"
_description = "Task"
'user_id': fields.many2one('res.users', 'Assigned to', select=True, track_visibility='onchange'),
Now want to assign a task to multiple users. and i have modified user_id field like this:
'user_id': fields.many2many('res.users', 'Assigned to', select=True, track_visibility='onchange'),
but it shows following traceback:
Traceback (most recent call last):
File "/home/hardik/odoo/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/hardik/odoo/odoo/openerp/http.py", line 574, in dispatch
result = self._call_function(**self.params)
File "/home/hardik/odoo/odoo/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/hardik/odoo/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/home/hardik/odoo/odoo/openerp/http.py", line 307, in checked_call
return self.endpoint(*a, **kw)
File "/home/hardik/odoo/odoo/openerp/http.py", line 803, in __call__
return self.method(*args, **kw)
File "/home/hardik/odoo/odoo/openerp/http.py", line 403, in response_wrap
response = f(*args, **kw)
File "/home/hardik/odoo/odoo/addons/web/controllers/main.py", line 884, in search_read
return self.do_search_read(model, fields, offset, limit, domain, sort)
File "/home/hardik/odoo/odoo/addons/web/controllers/main.py", line 905, in do_search_read
request.context)
File "/home/hardik/odoo/odoo/openerp/http.py", line 908, in proxy
result = meth(cr, request.uid, *args, **kw)
File "/home/hardik/odoo/odoo/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/hardik/odoo/odoo/openerp/models.py", line 5146, in search_read
result = self.read(cr, uid, record_ids, fields, context=read_ctx)
File "/home/hardik/odoo/odoo/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/hardik/odoo/odoo/openerp/models.py", line 3141, in read
result = BaseModel.read(records, fields, load=load)
File "/home/hardik/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/home/hardik/odoo/odoo/openerp/models.py", line 3176, in read
self._read_from_database(stored, inherited)
File "/home/hardik/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/home/hardik/odoo/odoo/openerp/models.py", line 3354, in _read_from_database
res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result)
File "/home/hardik/odoo/odoo/openerp/osv/fields.py", line 1012, in get
cr.execute(query, [tuple(ids),] + where_params)
File "/home/hardik/odoo/odoo/openerp/sql_db.py", line 158, in wrapper
return f(self, *args, **kwargs)
File "/home/hardik/odoo/odoo/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
ProgrammingError: syntax error at or near "to"
LINE 1: SELECT Assigned to.res_users_id, Assigned to.project_task_id...
^
please guide me how to deal with this. thanks in advance
When we create many2many type field, than we must to give a name of relation table where in that table record will store. In below example 'task_user_rel' is a relational table.
You may try this code:
'user_ids': fields.many2many('res.users', 'task_user_rel', 'user_id', 'id', 'Assigned to', select=True, track_visibility='onchange'),
Now add new user_ids field in xml side and hide/invisible a exists user_id field.

Error Generation While upgrading the OpenERP Module

Error is generated while i am upgrading my module in OpenERP
res_model not found error
Error:
Client Traceback (most recent call last):
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)
Server Traceback (most recent call last):
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)'
This is rather ambiguous question.
What version of openERP is in problem here?
In OE7, only ir_act_window has res_model, I don't even see model that you provided (ir.actions.act_window). Same in OE8.
If you could specify what is going, is this your module/extension? It would help a lot.
In my case, I have deleted a xml file for which menu item is created.As i have deleted the file,the menu item is searching for it and it is throwing the error.So finally i resolved the issue by deleting the Menu item.