How to format date in QWeb report

If you need specific formatting for the date shown on your QWeb report, you can achieve that by defining the attribute t-field-options with value {“format”: “<formating type>”}
For example, if you need the Invoice Date to be shown as 14.11.2016 the code would look like:

<span t-field="o.date_invoice" t-field-options='{"format": "%d.%m.%Y"}'/>


Leave a Reply

Your email address will not be published. Required fields are marked *