OpenERP 6.1: base/res/res_users.py: The context ismissing in the name_search method

Bug #1043871 reported by Nicolas Clément
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Committed
Low
OpenERP's Framework R&D

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)

Related branches

affects: openobject-addons → openobject-server
Changed in openobject-server:
status: New → Incomplete
importance: Undecided → Low
status: Incomplete → Confirmed
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
Revision history for this message
Turkesh Patel (openERP) (turkesh-tinyerp) wrote :

Hello,

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

revision-id: <email address hidden>

revno: 4381

Thanks,
Turkesh Patel

Changed in openobject-server:
status: Confirmed → In Progress
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.