summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/thread_view/thread_view.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-10-28 11:27:40 +0000
committerqsm-odoo <qsm@odoo.com>2020-10-29 11:17:06 +0000
commit53899994142b927b9f2ba9c19010428195650878 (patch)
tree64310c23e4150ac0814e1feb2bd8d6eeb6780bda /addons/mail/static/src/models/thread_view/thread_view.js
parent34e994739f70d9adea48f360ba8746716363e8c1 (diff)
[FIX] base: fix positional branding when inherited t-field sibling
The xpath branding of a node which followed a t-field node which was added by an inheritance view was not correct. E.g. View 1: ``` <hello> <world id="1"></world> <world t-field="a"/> <world id="2"></world> <world id="3"></world> </hello> ``` View 2 inheriting view 1: ``` <xpath expr="/hello/world[3]" position="after"> <world t-field="b"/> </xpath> ``` So the result is: ``` <hello> <world id="1"></world> <world t-field="a"/> <world id="2"></world> <world t-field="b"/> <world id="3"></world> </hello> ``` Now the xpath branding of world id="2" was /hello[1]/world[3], which is correct. But the xpath branding of world id="3" was /hello[1]/world[5] which is incorrect as it should be /hello[1]/world[4] (as related to the original view). This was because inherited t-field did not carry any information they came from inheritance (as "normal" nodes would). The side effect of this was that the incorrectly marked node was not possible to edit (and made the editor crash on save). Note: 'data-oe-field-xpath' and not 'data-oe-xpath' was used to carry the xpath information as this is stable fix. To avoid breaking custo and to make a minimal diff fix, a separated attribute was used. Once this is forward-ported to master, we'll try to use a common attribute and adapt everything accordingly. Closes https://github.com/odoo/odoo/pull/51885 closes odoo/odoo#60968 X-original-commit: 07cf2b9520fc6c79a9a7ca39929bda0bfbe85e3a Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/thread_view/thread_view.js')
0 files changed, 0 insertions, 0 deletions