summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2020-06-19 12:22:55 +0000
committerNicolas Lempereur <nle@odoo.com>2020-06-19 14:51:34 +0000
commit4c4a0eab958e0486af48a8afa17e024d6d8864b7 (patch)
treeaaee2cd673fba149883c1a08e2287379ef63e855 /addons/web/static/src/js/views/basic/basic_controller.js
parent8c5b47e8c3ed621a7ed81a8f951e5a414d6fa0da (diff)
[FIX] web{site,_editor}: oe_structure save clean data-oe-*
Since dd139948f004 when saving oe_structure for the first time, for eg. a `<div class="oe_structure" id="oe_structure_part_1"/>` structure, when edited we will create an inheriting view that fills it. But this inheriting view would contain branding data and "data-note-id" which would make this use case erroneous: - edit page and fill oe_structure => data-note-id="1" saved on view - edit page and add link in other oe_structure => error This happen because the data-note-id refers to the editor of the element currently being edited, since we saved it previously we get two elements with `data-note-id="1"` and the code will just get the first one which in reality could have not been in editing. With this change, we strip the branding data on the parent element. Without the change, added test failed with: AssertionError: '<div class="oe_structure" data-test="1" id="oe_structure_test" test="2">hello</div>' not found in '<t t-name="dummy"><div class="oe_structure" data-test="1" id="oe_structure_test" data-oe-id="55" test="2">hello</div> </t>' : saved element attributes are saved excluding branding ones opw-2268836 closes #53321 closes odoo/odoo#53346 X-original-commit: 855438be92ee71d8f8d5afedd52459e149ec49f7 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions