Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5148 Zobrazení

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 ? 


Avatar
Zrušit
Nejlepší odpověď

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>


Avatar
Zrušit
Autor

I have tried this. data is considered as None Type

do make print in the python?

Related Posts Odpovědi Zobrazení Aktivita
1
dub 25
1868
2
bře 25
2446
4
lis 24
7843
1
bře 24
2721
3
zář 23
25734