From cf0936044472a84461791f7aa3dbb1a9f41737b6 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 11 Dec 2008 23:00:09 +0100 Subject: [PATCH] [FIX] Remove the decode(utf8) function lp bug: https://launchpad.net/bugs/307248 fixed bzr revid: stephane@tinyerp.com-20081211220009-el7lc2bb0pqc99pc --- bin/osv/orm.py | 4 ++-- bin/wizard/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 920c27da946..148626ae26c 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -842,11 +842,11 @@ class orm_template(object): if not trans and ('base_model_name' in context): trans = tools.translate(cr, context['base_model_name'], 'view', context['lang'], node.getAttribute('string').encode('utf8')) if trans: - node.setAttribute('string', trans.decode('utf8')) + node.setAttribute('string', trans) if node.hasAttribute('sum') and node.getAttribute('sum'): trans = tools.translate(cr, self._name, 'view', context['lang'], node.getAttribute('sum').encode('utf8')) if trans: - node.setAttribute('sum', trans.decode('utf8')) + node.setAttribute('sum', trans) if childs: for f in node.childNodes: diff --git a/bin/wizard/__init__.py b/bin/wizard/__init__.py index 72be97b3958..fcacf67a476 100644 --- a/bin/wizard/__init__.py +++ b/bin/wizard/__init__.py @@ -54,7 +54,7 @@ class interface(netsvc.Service): if node.hasAttribute('string') and node.getAttribute('string'): trans = translate(cr, self.wiz_name+','+state, 'wizard_view', lang, node.getAttribute('string').encode('utf8')) if trans: - node.setAttribute('string', trans.decode('utf8')) + node.setAttribute('string', trans) for n in node.childNodes: self.translate_view(cr, n, state, lang)