Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
32523 Widoki

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>

Awatar
Odrzuć
Najlepsza odpowiedź

Try this format 


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


Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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

Powiązane posty Odpowiedzi Widoki Czynność
1
lip 25
2082
1
maj 25
2319
1
kwi 25
2561
1
lut 25
1856
0
paź 24
1575