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">
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) ?
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 1/15/15, 12:17 AM|
|Seen: 1066 times|
|Last updated: 3/16/15, 8:10 AM|