Skip to Content
Menu
This question has been flagged
2 Replies
32336 Zobrazenia

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
Zrušiť
Best Answer

Try this format 


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


Avatar
Zrušiť
Best Answer

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

Avatar
Zrušiť
Autor

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

Related Posts Replies Zobrazenia Aktivita
1
júl 25
1962
1
máj 25
2049
1
apr 25
2480
1
feb 25
1751
0
okt 24
1494