-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] base: correct branding for replaced node
Have an inherited view replacing a node in its parent namely: ``` <view name="1"> <world/> <world/> <world/> </view> ``` Inherited by ``` <view name="2" inherit_id="1"> <xpath expr="//world[1]" position="replace"> <world/> </xpath> </view> ``` Before this commit, the resulting xpath branding of the nodes (useful for web_editor, to know where it is supposed to anchor new elements) was incorrect. Note that there is the branding attr data-oe-view_id which specifies in which view they are The 2nd and 3rd world in view #1 were numbered respectively world[1] and world[2] which is incorrect since we *know* those should be world[2] and world[3] (in their own view, i.e. in view #1) This was because when replacing the node, the code lost track of what it replaced and that it attributed the inheriting branding to the replacing nodes After this commit, the 2nd and 3rd world nodes are numbered world[2] and world[3] respectively OPW 2007312 closes odoo#35134 Signed-off-by: Lucas Perais (lpe) <[email protected]>
- Loading branch information
1 parent
7b1a894
commit c077ef0
Showing
2 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters