[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:
Olivier Dony 2011-01-19 02:41:19 +01:00
parent f80fe2a66d
commit 19e9b8ddf9
1 changed files with 1 additions and 1 deletions

View File

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