コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3970 ビュー


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>
アバター
破棄
最善の回答

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.

アバター
破棄
関連投稿 返信 ビュー 活動
2
2月 19
4200
2
4月 25
6368
0
9月 22
4044
0
3月 22
6938
2
8月 25
616