Files
odoo_source/odoo
Lucas Perais (lpe) c077ef0557 [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/odoo#35134

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-01 11:25:27 +00:00
..
2018-11-14 09:40:17 +00:00
…
2019-07-11 09:03:14 +00:00