Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
31193 Переглядів

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>

Аватар
Відмінити
Найкраща відповідь

Try this format 


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


Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Автор

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

Related Posts Відповіді Переглядів Дія
1
трав. 25
654
1
квіт. 25
1779
1
лют. 25
971
0
квіт. 25
971
0
жовт. 24
766