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
3852 Zobrazení


I send the data to the template body, and then I want to retrieve it. What do I need to do in order for the report to display 'Your Name' instead <p>Your Name<p>

#Data send 
data = {
'html': '<p>Your Name<p>'
}
return {
'type': 'ir.actions.report',
'report_name': 'unicoding_agreement.report_agreement',
'report_type': "qweb-pdf",
'data': data,
}
#Report template
<t t-call="web.external_layout">
<t
t-esc="data['html']"/>
</t>
Avatar
Zrušit
Nejlepší odpověď

t-esc will escape the HTML values, so instead use t-raw, does not HTML-escape its output and
useful to display separately constructed markup (e.g. from functions) or already sanitized user-provided markup.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
úno 19
4062
2
dub 25
6123
0
zář 22
3919
0
bře 22
6813
2
srp 25
460