I am new to OpenERP 7 and we hired a freelancer to do some work for us
we needed the date of the entry to be limited to today, yesterday and the day before it
The freelancer did limit it though the selection but if the user were to type the date manually, it will still accept the entry
I mentioned to him this loophole and how it would make problems for us, but he claims that he would need to change a js file and it would be hard to accomplish
I took his word but my manager wants to confirm that I have not been tricked hence, this question
So, how possible is it to accomplish the mentioned apove
Hello Faez Abdulkareem,
Can you tell which field it is ? In which form ?
if the default fleet module, fuel log form
the date field
As it is in form view, i think it is possible to restrict the date field to, today, yesterday and day before without using js
he has done the restriction from the selection, but if the user were to type the date manually, the system would still accept
Other than making it as selection field, keep the field remain as same. And while before saving or give onchange function for this field & check whether entered date belongs to today,last day and day before. If not Show a error message/warning to select today, yesterday or day before
from your comment this seems to be an easy thing to achieve, if so then could you instruct me on how to do it on my own?
you can check this lInk , in this it is explained how to achieve the same,
http://stackoverflow.com/questions/31847678/how-to-make-previous-days-date-and-todays-date-only-accessible-in-date-time-pi