Skip to Content
मेन्यू
This question has been flagged
2 Replies
18233 Views

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
Discard

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

Author Best Answer

I solved. My question was answer. 

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


Avatar
Discard

This is awesome!!! - Thanks!

Best Answer

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

Avatar
Discard
Related Posts Replies Views Activity
0
मई 22
2249
3
नव॰ 22
8416
0
दिस॰ 18
3619
3
सित॰ 23
21111
2
अप्रैल 23
8540