Skip to Content
Menu
This question has been flagged
2 Replies
32347 Rodiniai

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>

Portretas
Atmesti
Best Answer

Try this format 


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


Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Autorius

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

Related Posts Replies Rodiniai Veikla
1
liep. 25
1964
1
geg. 25
2056
1
bal. 25
2486
1
vas. 25
1759
0
spal. 24
1498