[fix] opportuniy fixes #3262

This commit is contained in:
Rushabh Mehta 2015-05-15 13:51:12 +05:30
parent a6ee8290ce
commit 0eb2dae5d1

View File

@ -44,7 +44,7 @@ class Opportunity(TransactionBase):
def make_new_lead_if_required(self):
"""Set lead against new opportunity"""
if not self.lead or self.customer:
if not (self.lead or self.customer):
lead_name = frappe.db.get_value("Lead", {"email_id": self.contact_email})
if not lead_name:
lead = frappe.get_doc({