Odoo Help


Change the format of field Date on form view

Isabelle Richard
on 9/3/15, 4:23 AM 10,031 views


On a form view, I try to change the format used to display a field Date.
I don't want to change the format of all fields Date, just for one field.

In QWeb, I can use this syntax: 

<span t-field="blog_post.create_date" t-field-options='{"format": "MMMM yyyy"}'/>

Is it possible to do the same thing of form view, without editing date format on lang parameters ?

odoo dosen't have that kind of feature till odoo v8, If you know web customization than develop your own widget which accept the format parameter and display date value based on format passed from the form view.

Anil R. Kesariya
on 9/15/15, 5:14 AM

Thank you, I will try to develop my own Date widget with an option for format.

Isabelle Richard
on 9/15/15, 8:01 AM

You can do that with a widget:

<field name="date_order" widget="date"/>
Ankit H Gandhi(AHG)
On 9/13/15, 2:56 AM

Dear Isabelle Richard,

First you need to enable the Technical Features under your user account, then go to

Settings ->Translations -> Languages.

Edit your current language and change the date format

Thanks & Regards

Ankit H Gandhi.

Axel Mendoza
On 12/23/15, 2:36 AM

Use this module:


Jainik Patel (jaa)
On 12/16/15, 1:36 AM

It seems like o.date_order it's not a datetime object but a string. Using the time module is the way to go:

<span t-esc="time.strftime('%A, %d %B %Y',time.strptime(o.date_order,'%Y-%m-%d %H:%M:%S'))"/>

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 9/3/15, 4:23 AM
Seen: 10031 times
Last updated: 2/1/16, 9:46 AM