[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:
Quentin THEURET 2011-02-28 11:28:43 +01:00 committed by Olivier Dony
parent 4569d7856e
commit 7086606211
1 changed files with 1 additions and 1 deletions

View File

@ -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):