projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e85786
)
[FIX] orm: allow unicode in inherit views with attribute
author
kevin wang
<kevin_327@163.com>
Mon, 23 Jun 2014 10:48:27 +0000
(12:48 +0200)
committer
Martin Trigaux
<mat@openerp.com>
Mon, 23 Jun 2014 10:48:27 +0000
(12:48 +0200)
When extending a view with position='attributes', prevent crash if view contains unicode char
Fixes #706
openerp/osv/orm.py
patch
|
blob
|
history
diff --git
a/openerp/osv/orm.py
b/openerp/osv/orm.py
index
1dbac53
..
fc38169
100644
(file)
--- 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: