[FIX] Product: name_search() corrected while duplicating ids in sale_order_line (Ref : Case 5861)

bzr revid: skh@tinyerp.com-20110520073520-5abu4xp34x74dhxu
This commit is contained in:
skh
2011-05-20 13:05:20 +05:30
parent e40bd836e8
commit a1135313a6
+1 -2
View File
@@ -563,8 +563,7 @@ class product_product(osv.osv):
if not len(ids):
ids = self.search(cr, user, [('ean13','=',name)]+ args, limit=limit, context=context)
if not len(ids):
ids = self.search(cr, user, [('default_code',operator,name)]+ args, limit=limit, context=context)
ids += self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
ids = self.search(cr, user, ['|',('name',operator,name),('default_code',operator,name)] + args, limit=limit, context=context)
if not len(ids):
ptrn=re.compile('(\[(.*?)\])')
res = ptrn.search(name)