expected delivery date mandatory only if order type is sales

This commit is contained in:
Nabin Hait 2012-06-01 10:11:14 +05:30
parent e44ebb1ec7
commit e315aba130

View File

@ -286,7 +286,7 @@ class DocType(TransactionBase):
#-----------------------------------------------------------------------------------------------
def validate_order_type(self):
#validate delivery date
if self.doc.order_type != 'Maintenance' and not self.doc.delivery_date:
if self.doc.order_type == 'Sales' and not self.doc.delivery_date:
msgprint("Please enter 'Expected Delivery Date'")
raise Exception