Skip to Content
Menu
This question has been flagged
1 Atsakyti
5172 Rodiniai

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 ? 


Portretas
Atmesti
Best Answer

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>


Portretas
Atmesti
Autorius

I have tried this. data is considered as None Type

do make print in the python?

Related Posts Replies Rodiniai Veikla
1
bal. 25
1908
2
kov. 25
2513
4
lapkr. 24
7895
1
kov. 24
2764
3
rugs. 23
25805