fix: Always set required date based on min date on item table

This commit is contained in:
Nabin Hait 2019-10-15 12:43:27 +05:30
parent 0bb99c15e5
commit a113861b0c

View File

@ -695,8 +695,8 @@ class BuyingController(StockController):
def validate_schedule_date(self):
if not self.get("items"):
return
if not self.schedule_date:
self.schedule_date = min([d.schedule_date for d in self.get("items")])
self.schedule_date = min([d.schedule_date for d in self.get("items")])
if self.schedule_date:
for d in self.get('items'):