diff options
| author | fja-odoo <fja@odoo.com> | 2020-01-09 09:09:55 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-01-15 17:46:02 +0000 |
| commit | 47441a922812ef49cb452007e4b25d0cd99aa717 (patch) | |
| tree | d5132a61b005dfc5d401731ef64c19072ef72f14 | |
| parent | d595337889ca853a4f9e9736c776307425e0296c (diff) | |
[FIX] web_editor: save all child text nodes of oe_structure elements
When saving the content of an oe_structure, the starting text nodes
were lost because only the internal *elements* were considered. Ending
text nodes were kept since they are considered as the last element's
tail by the etree library.
task-2040764
closes odoo/odoo#43375
X-original-commit: eb71d25ce965ecdb20c26517627aed5b43f8b990
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
| -rw-r--r-- | addons/web_editor/models/ir_ui_view.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web_editor/models/ir_ui_view.py b/addons/web_editor/models/ir_ui_view.py index edda3ba6887..0aefd108432 100644 --- a/addons/web_editor/models/ir_ui_view.py +++ b/addons/web_editor/models/ir_ui_view.py @@ -67,6 +67,7 @@ class IrUiView(models.Model): xpath = etree.Element('xpath', expr="//*[hasclass('oe_structure')][@id='{}']".format(el.get('id')), position="replace") arch.append(xpath) structure = etree.Element(el.tag, attrib=el.attrib) + structure.text = el.text xpath.append(structure) for child in el.iterchildren(tag=etree.Element): structure.append(copy.deepcopy(child)) |
