Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
32357 Vues

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
Ignorer
Meilleure réponse

Try this format 


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


Avatar
Ignorer
Meilleure réponse

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

Avatar
Ignorer
Auteur

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

Publications associées Réponses Vues Activité
1
juil. 25
1967
1
mai 25
2068
1
avr. 25
2488
1
févr. 25
1761
0
oct. 24
1501