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>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 会計
- 在庫
- PoS
- Project
- MRP
この質問にフラグが付けられました
2
返信
32320
ビュー
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
関連投稿 | 返信 | ビュー | 活動 | |
---|---|---|---|---|
|
1
7月 25
|
1948 | ||
|
1
5月 25
|
2038 | ||
|
1
4月 25
|
2465 | ||
|
1
2月 25
|
1739 | ||
|
0
10月 24
|
1489 |