Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
10569 Widoki

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>


Awatar
Odrzuć
Najlepsza odpowiedź

<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()" />


Awatar
Odrzuć
Najlepsza odpowiedź

do you solv this problem? 


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
sie 22
11241
2
maj 21
8088
2
lut 19
9743
0
lip 18
3403
0
cze 24
657