[FIX] res.product: avoid issues with non-ascii product names, e.g. via NET-RPC (via xrg)
bzr revid: odo@openerp.com-20110119014119-336wp8ohqb5747hu
This commit is contained in:
@@ -565,7 +565,7 @@ class product_product(osv.osv):
|
||||
ids += self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
|
||||
if not len(ids):
|
||||
ptrn=re.compile('(\[(.*?)\])')
|
||||
res = ptrn.search(str(name))
|
||||
res = ptrn.search(name)
|
||||
if res:
|
||||
ids = self.search(cr, user, [('default_code','ilike',res.group(2))]+ args, limit=limit, context=context)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user