콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
10417 화면

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
11108
2
5월 21
7925
2
2월 19
9616
0
7월 18
3341
0
6월 24
609