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

* fix:  updating lead status while customer creation

* fix: changes requested
This commit is contained in:
Anurag Mishra 2021-08-10 13:17:41 +05:30 committed by GitHub
parent 25a2f2b90e
commit 24da00cada
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,9 +134,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: