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

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
952
1
7月 23
2765
1
9月 22
1322
0
5月 20
2472
3
3月 15
10234