From dd4617d30fc8d67d284595219edac2ba79b16d0b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 16 Jan 2015 15:07:34 +0530 Subject: [PATCH] Opportunity From field is mandatory --- erpnext/selling/doctype/opportunity/opportunity.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/selling/doctype/opportunity/opportunity.py b/erpnext/selling/doctype/opportunity/opportunity.py index af170c4da7..001ba3bf64 100644 --- a/erpnext/selling/doctype/opportunity/opportunity.py +++ b/erpnext/selling/doctype/opportunity/opportunity.py @@ -93,6 +93,9 @@ class Opportunity(TransactionBase): (not cint(self.get("__islocal"))) else None, }) + if not self.enquiry_from: + frappe.throw(_("Opportunity From field is mandatory")) + self.set_status() self.validate_item_details() self.validate_uom_is_integer("uom", "qty")