diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 8a21e7c746..8c695ed4c0 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_quotation(): + if not self.has_lost_quotation(): frappe.db.set(self, 'status', 'Lost') frappe.db.set(self, 'order_lost_reason', arg) else: