[FIX] pass context in search and name_get method inside name_search.
bzr revid: tpa@tinyerp.com-20120903084625-nnkl9k2ljaauv4bh
This commit is contained in:
parent
310aab1a57
commit
df107e19ec
|
@ -310,10 +310,10 @@ class res_users(osv.osv):
|
|||
context={}
|
||||
ids = []
|
||||
if name:
|
||||
ids = self.search(cr, user, [('login','=',name)]+ args, limit=limit)
|
||||
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)
|
||||
return self.name_get(cr, user, ids)
|
||||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
user2copy = self.read(cr, uid, [id], ['login','name'])[0]
|
||||
|
|
Loading…
Reference in New Issue