Skip to Content
Menu
This question has been flagged
2 Replies
18187 Rodiniai

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?


Portretas
Atmesti

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

Autorius 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>


Portretas
Atmesti

This is awesome!!! - Thanks!

Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
geg. 22
2149
3
lapkr. 22
8364
0
gruod. 18
3560
3
rugs. 23
21021
2
bal. 23
8434