summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-02-28 18:00:58 +0000
committerRomain Derie <rde@odoo.com>2019-03-07 10:30:54 +0000
commit63ba2317f8de9d1c92400e328cc421f67212793e (patch)
tree538fb44549f53cff9f2d30643deb1d7db32adac0 /addons/web/static/src/js/views/basic/basic_model.js
parent9d4aad2d67019a3dd2ff5c45c89f3cc1a6202e78 (diff)
[FIX] website: get the error view without parsing the view tree
Before this commit: The `if` condition doing a `View._views_get` was supposed to be a sort of 'hack' for when the error occured in a child view (as the template raised would be the parent, not the broken child). But since we refactored that part to use etree, it was actually going into that condition for every error even if the error was in the called template. Proof is, we only set `editable` in that if condition, meaning going in the else would actually prevent to show reset template. Indeed the following code would always be true: et = etree.fromstring(view.with_context(inherit_branding=False).read_combined(['arch'])['arch']) node = et.find(exception.path.replace('/templates/t/', './')) as read_combined returns all the view hierarchy DOM Note: We could not fix this by checking exception.path against `arch` as we could have false positive (eg the child view replace the <p> element by another <p> element which is broken, then the path would be found in the parent view even if the error was in the child view). closes odoo/odoo#31515 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions