[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:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user