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

Hi,

return self.env['report'].get_action(self, 'my_module_my_template', data=datas)

I passed python dictionary in data. But it is None  when I print in Xml.

<t t-esc="data"/>

Can anyone explain how can I solve this ? 


頭像
捨棄
最佳答案

First check in python, 

print datas

check any entries in datas,
if yes, 

data['form']['department']

Use like this, its may works,

<t t-if="data['form']['department']">
<h3><t t-esc="data['form']['department']"/></h3>
</t>


頭像
捨棄
作者

I have tried this. data is considered as None Type

do make print in the python?

相關帖文 回覆 瀏覽次數 活動
1
4月 25
1865
2
3月 25
2437
4
11月 24
7834
1
3月 24
2715
3
9月 23
25723