Odoo Help


How to add an attribute to main "widget" used in qweb?

Shawn Varghese
on 1/15/15, 12:17 AM 1,658 views

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) ?



One way to obtain the list of widgets is through:

ePillars Systems LLC, Shawn Varghese
on 1/15/15, 8:57 AM

Shawn Varghese

--Shawn Varghese--
| 5 3 7
Dubai, United Arab Emirates
--Shawn Varghese--

Shawn Varghese
On 1/15/15, 8:57 AM

Ok, one way to obtain the list is through:

<t t-log="widget" />

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/15/15, 12:17 AM
Seen: 1658 times
Last updated: 3/16/15, 8:10 AM