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
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
2
Respuestas
30676
Vistas
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
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
may 25
|
510 | ||
|
1
abr 25
|
1624 | ||
|
1
feb 25
|
683 | ||
|
0
abr 25
|
763 | ||
|
0
oct 24
|
617 |