[FIX]Yaltik DSL : fix for unicode child (not only str)

This commit is contained in:
Fabien BOURGEOIS 2020-04-29 18:41:18 +02:00
parent 829c72900a
commit 407b0fb78f
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@
'name': 'Yaltik Odoo DSL base module and fns',
'summary': 'Yaltik Odoo Domain Specific Language base module and functions',
'description': """ Yaltik Odoo Domain Specific Language base module and functions """,
'version': '10.0.0.2.3',
'version': '10.0.0.2.4',
'category': 'Yaltik',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -35,7 +35,7 @@ def xmlchild(parent, children):
""" Handling of children (ie non root) XML Nodes with/o text and
subchildren (recursive) """
for child in children:
if isinstance(child, str):
if isinstance(child, (str, unicode)):
parent.text = child
else:
attrs = {unicode(k): unicode(v) for [k, v] in child['attrs'].items()}