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

I am having problem of getting a value in QWeb template based on a session and model field for example

<t t-set="foo" t-value=lang direction of the current session language  />


아바타
취소
작성자 베스트 답변

After long search I found a solution for value=lang direction of the current session language in a template


<t t-set="dir" t-value="env['res.lang']" />

<html style="height:100%" t-att-dir="dir.search([('code', '=', env.lang)], limit=1).direction">


This means I can query any model with and an Environment variable

 

아바타
취소
베스트 답변

I have no difficulty to do such thing. I follow this guide:

https://www.odoo.com/nl_NL/forum/help-1/question/how-do-you-use-variables-in-a-qweb-loop-67687 

What value do you want to show exactly?

아바타
취소
관련 게시물 답글 화면 활동
0
1월 25
1035
1
7월 23
2872
1
9월 22
1322
0
5월 20
2586
3
3월 15
10341