summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/qweb/qweb2.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2017-04-26 16:28:36 +0200
committerChristophe Matthieu <chm@odoo.com>2017-05-04 17:19:25 +0200
commit27ff895dfd92619d496f67c8b11cb76277bf62d2 (patch)
treea13010caf2c7cf8ddfe51e1466d8d5d03f946898 /addons/web/static/lib/qweb/qweb2.js
parent34e4f995489b2a626d30aff7dd2aa6a600cee312 (diff)
[IMP] web: extend qweb to allow dynamic templates in t-call
Before this change the t-call can use only receive a literal as parameters: <t t-call="template.name17" /> This call render the template 'template.name17' with the current context. Now, we can defined an expression with braces (same syntax that t-attf): <t t-call="template.name{{ 10 + 7 }}" /> This call render the template 'template.name17' with the current context. This change allows for greater flexibility for applications using qweb. (The performance due to this change is unchanged during rendering time.)
Diffstat (limited to 'addons/web/static/lib/qweb/qweb2.js')
-rw-r--r--addons/web/static/lib/qweb/qweb2.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/lib/qweb/qweb2.js b/addons/web/static/lib/qweb/qweb2.js
index 378c5eb6023..c4bb7128e9b 100644
--- a/addons/web/static/lib/qweb/qweb2.js
+++ b/addons/web/static/lib/qweb/qweb2.js
@@ -785,9 +785,9 @@ QWeb2.Element = (function() {
},
compile_action_call : function(value) {
if (this.children.length === 0) {
- return this.top("r.push(context.engine.tools.call(context, " + (this.engine.tools.js_escape(value)) + ", dict));");
+ return this.top("r.push(context.engine.tools.call(context, " + (this.string_interpolation(value)) + ", dict));");
} else {
- this.top("r.push(context.engine.tools.call(context, " + (this.engine.tools.js_escape(value)) + ", dict, null, function(context, dict) {");
+ this.top("r.push(context.engine.tools.call(context, " + (this.string_interpolation(value)) + ", dict, null, function(context, dict) {");
this.bottom("}));");
this.indent();
this.top("var r = [];");