Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
18106 Vizualizări

Guys

I want to show the objects like following without using python code.

<t t-foreach="code equivalent to request.env['your.model'].search([])"  t-as="obj">
       <t t-esc="obj.name"/>
 </t>

Is it possible?


Imagine profil
Abandonează

so you dont need to fetch from template .. do you mean that?

Autor Cel mai bun răspuns

I solved. My question was answer. 

<t t-foreach="request.env['your.model'].search([])" t-as="obj">
    <t t-esc="obj.name"/>
</t>


Imagine profil
Abandonează

This is awesome!!! - Thanks!

Cel mai bun răspuns

For qweb templates, it doesn't work.
it's basically for odoo website template, not for qweb template.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
mai 22
2086
3
nov. 22
8283
0
dec. 18
3506
3
sept. 23
20941
2
apr. 23
8364