openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #15120
[Bug 1043871] Re: OpenERP 6.1: base/res/res_users.py: The context ismissing in the name_search method
** Project changed: openobject-addons => openobject-server
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1043871
Title:
OpenERP 6.1: base/res/res_users.py: The context ismissing in the
name_search method
Status in OpenERP Server:
New
Bug description:
Hi,
in base/res/res_users.py, method name_search(), the parameter context
is missing in the methods search and name_get.
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:
context={}
ids = []
if name:
ids = self.search(cr, user, [('login','=',name)]+ args, limit=limit)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
return self.name_get(cr, user, ids)
it should be:
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:
context={}
ids = []
if name:
ids = self.search(cr, user, [('login','=',name)]+ args, limit=limit, context=context)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
return self.name_get(cr, user, ids, context=context)
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1043871/+subscriptions
References