fix: updating lead status while customer creation (#26606)
* fix: updating lead status while customer creation * fix: changes requested
This commit is contained in:
parent
8db0f07115
commit
94beda65ca
@ -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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user