Odoo Help


Is there a way to list all objects available to a template?

Jeff Beidler
on 1/19/15, 7:49 PM 769 views

When working on QWeb views, is there some means of finding out which objects are available, without knowing them by name?  For instance, I would think that "company" should be available from almost all templates, but I'm finding that it's not set in the template which outputs order lines.  Is there a magic trick, or specialized function?


Shawn Varghese

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

Shawn Varghese
On 1/20/15, 1:25 AM

I have also been looking for the answer to this question. The only thing I could find was that, in case I'm looking for something in order line template, I query the sale_order_line table for all the available columns. There is a company_id column in the sale_order_line table. So we can access company name as "l.company_id.name", as illustrated in the following code:

<tr t-foreach="o.order_line" t-as="l">
                                        <span t-field="l.company_id.name"></span>


But I guess you have already tried this.

I'm also searching for one that would give all available attributes - it would speed up report development a lot.

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/19/15, 7:49 PM
Seen: 769 times
Last updated: 3/16/15, 8:10 AM