Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
18365 Weergaven

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?


Avatar
Annuleer

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

Auteur Beste antwoord

I solved. My question was answer. 

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


Avatar
Annuleer

This is awesome!!! - Thanks!

Beste antwoord

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
mei 22
2392
3
nov. 22
8493
0
dec. 18
3739
3
sep. 23
21349
2
apr. 23
8699