summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2018-12-14 11:03:13 +0000
committerRomain Derie <rde@odoo.com>2018-12-19 18:24:50 +0000
commite0c67651db9e762175c341c940024a5471b2e35c (patch)
treedbfacfcefecc77be53468235c20ee285629b0426 /doc/reference/javascript_reference.rst
parentae8232136de496294383420abb3282fb51fcb292 (diff)
[FIX] website: prevent customize options to be reordered
With multi-website, activating a customize option (customize_show view) will actually duplicate the customize view to make it specific. By doing so, the duplicated view will have a higher ID than the original, and the original's siblings customize options. Before this fix, two issues could be seen: 1. When toggling a customize option, it would appear last in the dropdown afterward. This is because of the views being sorted by (priority, id) (if the views have the same priority). 2. When toggling, sometimes the views header would be duplicated. This comes from the JS code that loop through the returned views and create the DOM by adding a header when the view inherit_id is different than the previous. Obviously, as 2 views with the same inherit_id could not be grouped together now that the specific one has a bigger ID, it will create twice the DOM. => Check tests in this commit, they have schemas that will explain it clearly Note: We don't take priority into account for customize menu view order as it would create the same problem as (2.) We could have sorted by (inherit_id, priority, name) to avoid the issue and give the user possibility to order options in header but it was decided we dont. Closes #29347
Diffstat (limited to 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions