Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
32335 Visualizações

No matter the date is '2019-12-31' or not,still display in the QWEB report.What is the correct format of date in QWEB report?
*.py
resign_date = fields.Date(string="Resign Date", default="2019-12-31")

report/*.xml
<t t-if="l.resign_date != '2019-12-31'">
    <span t-field="l.resign_date"/>
</t>

Avatar
Cancelar
Melhor resposta

Try this format 


<span t-field="l.resign_date" t-options='{"widget": "date","format": "dd-MM-yyyy"}'/>


Avatar
Cancelar
Melhor resposta

<span t-field="l.resign_date" t-options='{"format": "MM/dd/yyyy"}'/>

Avatar
Cancelar
Autor

But the default date '2019-12-31' still display in the report

Publicações relacionadas Respostas Visualizações Atividade
1
jul. 25
1962
1
mai. 25
2049
1
abr. 25
2480
1
fev. 25
1751
0
out. 24
1494