Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
5128 Vizualizări

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 ? 


Imagine profil
Abandonează
Cel mai bun răspuns

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>


Imagine profil
Abandonează
Autor

I have tried this. data is considered as None Type

do make print in the python?

Related Posts Răspunsuri Vizualizări Activitate
1
apr. 25
1865
2
mar. 25
2438
4
nov. 24
7836
1
mar. 24
2716
3
sept. 23
25725