Odoo Help


How to extend year of date format

aneesh ATEES Infomedia Pvt Ltd
on 2/10/15, 2:26 AM 661 views

Dear sir/madam

i need to display calender date before 2005.where should i alter the code.



| 5 3 6
Jakarta, Indonesia
On 2/10/15, 5:10 AM

The ultimate source is in the odoo/odoo/addons/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js which sets the yearRange to be c-10:c+10, i.e. current - 10 years to current + 10 years.  That's why you are seeing years from 2005 to 2025 this year.  The DatePicker instance, I think, is instantiated in the odoo/odoo/addons/web/static/src/js/view_form.js file (search for the start method of instance.web.DateTimeWidget).  You can either change it from that file (add yearRange in setDefaults to your satisfaction) or override the start method of instance.web.DateTimeWidget.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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

1 follower(s)


Asked: 2/10/15, 2:26 AM
Seen: 661 times
Last updated: 3/16/15, 8:10 AM