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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
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">
<td>
<span t-field="l.company_id.name"></span>
</td>
</tr>
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.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
Can I determine object type in QWeb?
Rozwiązane
|
|
1
sty 22
|
8265 | |
|
1
lip 16
|
24318 | ||
|
2
mar 15
|
7499 | ||
QWEB: Place full width image on page
Rozwiązane
|
|
1
cze 21
|
7969 | |
|
0
mar 15
|
3726 |