← Back to team overview

openerp-india team mailing list archive

[Bug 1043871] Re: OpenERP 6.1: base/res/res_users.py: The context ismissing in the name_search method

 

Hello,

It has been Fixed in https://code.launchpad.net/~openerp-dev/openobject-
server/trunk-bug-1043871-tpa

revision-id: tpa@xxxxxxxxxxx-20120903084625-nnkl9k2ljaauv4bh

revno: 4381

Thanks,
Turkesh Patel

** Changed in: openobject-server
       Status: Confirmed => In Progress

** Branch linked: lp:~openerp-dev/openobject-server/trunk-
bug-1043871-tpa

** Changed in: openobject-server
       Status: In Progress => Fix Committed

-- 
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:
  Fix Committed

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