[FIX] Decode to utf-8

[IMP] Don't compute twice the xml stream

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

bzr revid: stephane@tinyerp.com-20090203140830-ij2s919zywxs9fvi
This commit is contained in:
Stephane Wirtel
2009-02-03 15:08:30 +01:00
parent e4bc01cdc8
commit 1de14e18c5
@@ -182,7 +182,7 @@ class base_module_record(osv.osv):
val = str(val)
val = val and ('"""%s"""' % val.replace('\\', '\\\\').replace('"', '\"')) or 'False'
field.setAttribute(u"eval", val)
field.setAttribute(u"eval", val.decode('utf-8'))
record.appendChild(field)
return record_list, noupdate
@@ -324,8 +324,8 @@ class base_module_record(osv.osv):
data.appendChild(res)
elif rec[0]=='assert':
pass
res = doc.toprettyxml(indent="\t")
return doc.toprettyxml(indent="\t").encode('utf8')
return doc.toprettyxml(indent="\t").encode('utf-8')
base_module_record()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: