Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
32255 Prikazi

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

Try this format 


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


Avatar
Opusti
Best Answer

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

Avatar
Opusti
Avtor

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

Related Posts Odgovori Prikazi Aktivnost
1
jul. 25
1845
1
maj 25
1927
1
apr. 25
2373
1
feb. 25
1663
0
okt. 24
1440