summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2019-07-24 09:31:10 +0000
committerLucas Perais (lpe) <lpe@odoo.com>2019-08-01 11:25:27 +0000
commitc077ef05575d9677bce284195683f96c68386788 (patch)
treea274f46145fcb521df046feedb56d35b24e34eb7 /addons/web/static/src/js/fields/basic_fields.js
parent7b1a894573b1499e9ea563f500c866378a65e1ca (diff)
[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>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions