Odoo Help


This community 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.


how to hide previous dates

on 2/10/15, 1:06 AM 462 views

hi all,

requirment is i defined date field. it should hide previous dates how can we do this.

or is there any method to that it should not select previous dates like it should through an error.




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

OpenERP uses JQuery DatePicker widget to select the dates.  This post provides a overview of how you can control dates to be disabled in various ways.  The datepicker, 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 or override the start method of instance.web.DateTimeWidget.



| 6 4 7
Lodz, Poland

On 2/10/15, 5:08 AM

You define onchange method for this filed. In this method you verify selected date, if date is previous, generate Error, Warning or Info exception.

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 2/10/15, 1:06 AM
Seen: 462 times
Last updated: 3/16/15, 8:10 AM