Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
31997 Zobrazení

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šit
Nejlepší odpověď

Try this format 


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


Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Autor

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

Related Posts Odpovědi Zobrazení Aktivita
1
čvc 25
1618
1
kvě 25
1570
1
dub 25
2209
1
úno 25
1498
0
říj 24
1258