[MERGE] Merge SKH's branch to remove duplicates on name_search (case:5861) branch: lp:~openerp-dev/openobject-addons/6.0-opw-5861-skh
bzr revid: pso@tinyerp.com-20110526133711-xdixf32fwj4i6vvb
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user