diff options
| author | Luis González <lgonzalez@vauxoo.com> | 2018-06-07 04:18:37 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim-odoo@users.noreply.github.com> | 2018-06-12 10:14:29 +0200 |
| commit | d5d797360ad8dd057e00ec4a9d9ae4c5ba5b5276 (patch) | |
| tree | 54938a28db4a4806e895e2db19d17c1450d497ce /addons/web/static/src/js/fields/basic_fields.js | |
| parent | e34a9ba58f4792bb9e8c121ce8586dfd7a9d833b (diff) | |
[FIX] base: Avoid exception when showing error in namespaced qweb node
Before this commit, if a SyntaxError or any other exception occurs in a
qweb attribute, and the path to the node contains at least one
namespaced tag, e.g.:
<mynode:node xmlns:mynode="http://example.com/mynode">
<field t-att-value="'This is a TypeError' + []"/>
</mynode:node>
the following exception is raised, instead of the actual one:
lxml.etree.XPathEvalError: Undefined namespace prefix
After this commit, if the path to the failing node contains a namespaced
tag, the node is not retrieved, to avoid the above exception, So this
one will be raised:
Error to render compiling AST
TypeError: Can't convert 'list' object to str implicitly
Template: module.template_name
Path: /templates/mynode:node/field
In addition, a test case was included, to ensure this works as expected
Closes #24824
opw-1853232
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
