Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4030 Lượt xem


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>
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhấ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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 19
4241
2
thg 4 25
6423
0
thg 9 22
4096
0
thg 3 22
6982
2
thg 8 25
644