Odoo Help

Welcome!

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.

0

how to hide previous dates

By
supreeth
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.

Thanks

1

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
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.

1

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
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)

Stats

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