i have field start date & end date, and i want end date can't be filled less then start date , and there will be warning if end date filled < start date
how, should i code method...thanks before
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
i have field start date & end date, and i want end date can't be filled less then start date , and there will be warning if end date filled < start date
how, should i code method...thanks before
Hi Susi,
You can add sql constraint for this as follows:-
_sql_constraints = [
('date_check', "CHECK ( (start_date <= end_date))", "The start date must be anterior to the end date.")
]
This will check the condition and if condition fails it will show the given message.
Hope this helps.
Hi
this link can help for youe question :
https://www.odoo.com/forum/help-1/question/how-to-validate-star-date-is-less-than-the-current-date-or-not-50921#answer-50926
its work thank u
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up