コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
11037 ビュー

Please help me here

this is in my template

<t t-set=”abcd” t-value=”my_function()” /> 
<t t-esc="abcd"/>

this is my java script

<script>
function my_function(){
var msg= 'Hello';
return msg;
}
</script>


アバター
破棄
最善の回答

<t t-set="count" t-value="window.my_function()" />

if you want to pass other function which is not availabe at window global object then pass it as args like

$(QWeb.render('my_tempalte', {my_function: widget.my_function}));
it will call by <t t-set="abcd" t-value="my_function()" />


アバター
破棄
最善の回答

do you solv this problem? 


アバター
破棄
関連投稿 返信 ビュー 活動
2
8月 22
11618
2
5月 21
8508
2
2月 19
10143
0
7月 18
3742
0
6月 24
977