跳至內容
選單
此問題已被標幟
2 回覆
32342 瀏覽次數

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

相關帖文 回覆 瀏覽次數 活動
1
7月 25
1964
1
5月 25
2054
1
4月 25
2485
1
2月 25
1757
0
10月 24
1497