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>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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()" />
| 相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
|---|---|---|---|---|
|
2
8月 22
|
12461 | |||
|
2
5月 21
|
9476 | |||
|
2
2月 19
|
10896 | |||
|
0
7月 18
|
4461 | |||
|
0
6月 24
|
1617 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.