Odoo Help


how to hide previous dates

on 2/10/15, 1:06 AM 754 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.


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.

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.

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, 1:06 AM
Seen: 754 times
Last updated: 3/16/15, 8:10 AM