Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
11035 Vistas

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>


Avatar
Descartar
Mejor respuesta

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


Avatar
Descartar
Mejor respuesta

do you solv this problem? 


Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
ago 22
11618
2
may 21
8508
2
feb 19
10143
0
jul 18
3742
0
jun 24
977