Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
5154 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur

I have tried this. data is considered as None Type

do make print in the python?

Publications associées Réponses Vues Activité
1
avr. 25
1871
2
mars 25
2454
4
nov. 24
7847
1
mars 24
2723
3
sept. 23
25738