コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
18197 ビュー

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
2169
3
11月 22
8372
0
12月 18
3569
3
9月 23
21039
2
4月 23
8462