Reduce start and end date verification

Given the actual scenario, that verify if the start_date <= end_date, do schedule a Maintenance, 2 days are required, but in many cases only one day is required!
This commit is contained in:
Maxwell Morais 2016-05-16 06:06:59 -03:00
parent 4e7b52952e
commit 52a66fc90b

View File

@ -153,7 +153,7 @@ class MaintenanceSchedule(TransactionBase):
elif not d.sales_person:
throw(_("Please select Incharge Person's name"))
if getdate(d.start_date) >= getdate(d.end_date):
if getdate(d.start_date) > getdate(d.end_date):
throw(_("Start date should be less than end date for Item {0}").format(d.item_code))
def validate_sales_order(self):