跳至內容
選單
此問題已被標幟
2 回覆
18199 瀏覽次數

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
2172
3
11月 22
8375
0
12月 18
3571
3
9月 23
21043
2
4月 23
8473