diff options
| author | Romain Derie <rde@odoo.com> | 2018-11-05 13:16:30 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2018-11-15 14:17:28 +0000 |
| commit | 410c07283b0e8336a051b948ca9dd02bfcd1068c (patch) | |
| tree | 5305dd9713a15e7371affec00442c3e319a41076 /addons/web_editor/static/src/xml | |
| parent | 4dae545bf9f886cc41a42150c29e6b0c7efaac5d (diff) | |
[FIX] website: set inherit_id on child COW for view validation
Before this commit:
1. If a view A is being inherited by a view B and C and the view C is doing an
xpath on B (but inherit A), then copying the tree to make it specific would
crash.
Indeed, when copying C, the view inheritance check (while doing the xml
check) would break since C would be tested against the generic tree and not
the new specific tree.
2. If a generic view being written with a website_id in the context had already
a specific child, we would copy both its specific child and generic child
for the same key instead of simply copying the specific one.
This happens if we triggered previously a COW on a child view, then only
that view had been made specific (and is still in the generic tree).
Then, when cloning the parent, we need to copy and make specific all the
hierarchy but ignore the generic elements if they already have a specific
one.
Now:
1. Fixed with adding the inherit_id on the copy vals
2. Fixed with filtering children_ids with filter_duplicate() before cloning the
children tree
opw-1908308
Closes #27914
closes odoo/odoo#28405
Diffstat (limited to 'addons/web_editor/static/src/xml')
0 files changed, 0 insertions, 0 deletions
