Skip to Content
Menú
This question has been flagged
2 Respostes
32260 Vistes

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
Descartar
Best Answer

Try this format 


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


Avatar
Descartar
Best Answer

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

Avatar
Descartar
Autor

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

Related Posts Respostes Vistes Activitat
1
de jul. 25
1851
1
de maig 25
1933
1
d’abr. 25
2376
1
de febr. 25
1664
0
d’oct. 24
1441