[FIX] Custom Object xml arch needed encoding.

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

bzr revid: jvo@tinyerp.com-20091125093504-2tdb5sx3hltpxnjq
This commit is contained in:
Jay (Open ERP)
2009-11-25 15:05:04 +05:30
parent fcbe52c0a0
commit 3fd8dfcd79
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -133,14 +133,14 @@ class ir_translation(osv.osv):
'and type=%s ' \
'and name=%s ' \
'and src=%s',
(lang, tt, str(name), source))
(lang, tt, tools.ustr(name), source))
else:
cr.execute('select value ' \
'from ir_translation ' \
'where lang=%s ' \
'and type=%s ' \
'and name=%s',
(lang, tt, str(name)))
(lang, tt, tools.ustr(name)))
res = cr.fetchone()
trad = res and res[0] or ''
return trad
+1 -1
View File
@@ -1326,7 +1326,7 @@ class orm_template(object):
xml = self.__get_default_calendar_view()
else:
xml = ''
result['arch'] = etree.fromstring(xml)
result['arch'] = etree.fromstring(encode(xml))
result['name'] = 'default'
result['field_parent'] = False
result['view_id'] = 0