From fdc7d7f3dee920166508fc8c20e4a1d141a99a6f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 23 May 2017 12:02:34 +0530 Subject: [PATCH] Check for active quotations before declaring it as lost (#8969) --- erpnext/crm/doctype/opportunity/opportunity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 8c695ed4c0..eebf464047 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -75,7 +75,7 @@ class Opportunity(TransactionBase): self.lead = lead_name def declare_enquiry_lost(self,arg): - if not self.has_lost_quotation(): + if not self.has_active_quotation(): frappe.db.set(self, 'status', 'Lost') frappe.db.set(self, 'order_lost_reason', arg) else: