[FIX] product: name_search should give precedence to product code only on exact match
lp bug: https://launchpad.net/bugs/726415 fixed bzr revid: odo@openerp.com-20110228102843-j85u4gmknxsni66y
This commit is contained in:
parent
4569d7856e
commit
7086606211
|
@ -557,7 +557,7 @@ class product_product(osv.osv):
|
|||
if not args:
|
||||
args=[]
|
||||
if name:
|
||||
ids = self.search(cr, user, [('default_code',operator,name)]+ args, limit=limit, context=context)
|
||||
ids = self.search(cr, user, [('default_code','=',name)]+ args, limit=limit, context=context)
|
||||
if not len(ids):
|
||||
ids = self.search(cr, user, [('ean13','=',name)]+ args, limit=limit, context=context)
|
||||
if not len(ids):
|
||||
|
|
Loading…
Reference in New Issue