fix: updating lead status while customer creation (#26606)

* fix:  updating lead status while customer creation

* fix: changes requested
This commit is contained in:
Anurag Mishra 2021-08-10 13:16:46 +05:30 committed by GitHub
parent 8db0f07115
commit 94beda65ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,9 +157,7 @@ class Customer(TransactionBase):
'''If Customer created from Lead, update lead status to "Converted" '''If Customer created from Lead, update lead status to "Converted"
update Customer link in Quotation, Opportunity''' update Customer link in Quotation, Opportunity'''
if self.lead_name: if self.lead_name:
lead = frappe.get_doc('Lead', self.lead_name) frappe.db.set_value("Lead", self.lead_name, "status", "Converted")
lead.status = 'Converted'
lead.save()
def create_lead_address_contact(self): def create_lead_address_contact(self):
if self.lead_name: if self.lead_name: