Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4036 Ansichten


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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Feb. 19
4254
2
Apr. 25
6444
0
Sept. 22
4111
0
März 22
6986
2
Aug. 25
650