expected delivery date mandatory only if order type is sales
This commit is contained in:
parent
e44ebb1ec7
commit
e315aba130
@ -286,7 +286,7 @@ class DocType(TransactionBase):
|
|||||||
#-----------------------------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------------------------
|
||||||
def validate_order_type(self):
|
def validate_order_type(self):
|
||||||
#validate delivery date
|
#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'")
|
msgprint("Please enter 'Expected Delivery Date'")
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user