[MERGE] orm: convert exception to unicode.

lp bug: https://launchpad.net/bugs/811519 fixed

bzr revid: vmt@openerp.com-20110915145933-p2apahreex255nd6
This commit is contained in:
Vo Minh Thu 2011-09-15 16:59:33 +02:00
commit 94662b9727
1 changed files with 1 additions and 1 deletions

View File

@ -1214,7 +1214,7 @@ class orm_template(object):
current_module, res, mode=mode, xml_id=xml_id,
noupdate=noupdate, res_id=res_id, context=context)
except Exception, e:
return (-1, res, 'Line ' + str(position) +' : ' + str(e), '')
return (-1, res, 'Line ' + str(position) + ' : ' + tools.ustr(e), '')
if config.get('import_partial', False) and filename and (not (position%100)):
data = pickle.load(file(config.get('import_partial')))