Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
32327 Представления

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
1958
1
мая 25
2042
1
апр. 25
2476
1
февр. 25
1748
0
окт. 24
1492