Odoo Help

0

how to hide previous dates

By
supreeth
on 2/10/15, 1:06 AM 529 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--
Ivan
3235
| 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--
6178
| 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 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.

Register

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)

Stats

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