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

I am trying to customize some QWeb reports and have seen the use of "widget" in multiple places.

e.g. In /web/static/src/xml/base.xml, the following are used:

<t t-foreach="widget.sections" t-as="section">

widget.items[1].length

widget.options

I understand that these attributes have probably been defined in the JS files. But how do I add a new variable which can be used as a property of widget? I tried assigning "this.new_var=new_var", in JS, but I was unable to access it in qweb. Also, is there any way of displaying all the properties of widget (similar to console.log(self) in JS) ?

 

 

아바타
취소
작성자

One way to obtain the list of widgets is through:

작성자 베스트 답변

Ok, one way to obtain the list is through:

<t t-log="widget" />

아바타
취소
관련 게시물 답글 화면 활동
3
12월 16
17254
1
4월 25
1287
2
3월 25
1465
4
11월 24
7138
1
3월 24
2076