Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
3941 Visualizações


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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
fev. 19
4185
2
abr. 25
6328
0
set. 22
4027
0
mar. 22
6913
2
ago. 25
588