Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
32330 Vizualizări

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>

Imagine profil
Abandonează
Cel mai bun răspuns

Try this format 


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


Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

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

Related Posts Răspunsuri Vizualizări Activitate
1
iul. 25
1959
1
mai 25
2047
1
apr. 25
2479
1
feb. 25
1749
0
oct. 24
1493