콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
18196 화면

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
2161
3
11월 22
8369
0
12월 18
3564
3
9월 23
21031
2
4월 23
8447