跳至内容
菜单
此问题已终结
2 回复
18087 查看

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?


形象
丢弃

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

编写者 最佳答案

I solved. My question was answer. 

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


形象
丢弃

This is awesome!!! - Thanks!

最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
0
5月 22
2071
3
11月 22
8269
0
12月 18
3492
3
9月 23
20923
2
4月 23
8355