From: kevin wang Date: Mon, 23 Jun 2014 10:48:27 +0000 (+0200) Subject: [FIX] orm: allow unicode in inherit views with attribute X-Git-Tag: 8.0.0~25^2~24^2~100^2~4 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=59c27970b56b60cadd3711db536492ad7c282564;p=odoo%2Fodoo.git [FIX] orm: allow unicode in inherit views with attribute When extending a view with position='attributes', prevent crash if view contains unicode char Fixes #706 --- diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 1dbac53..fc38169 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -2162,7 +2162,7 @@ class BaseModel(object): node.getparent().remove(node) elif pos == 'attributes': for child in spec.getiterator('attribute'): - attribute = (child.get('name'), child.text and child.text.encode('utf8') or None) + attribute = (child.get('name'), child.text or None) if attribute[1]: node.set(attribute[0], attribute[1]) else: