fix: Assignment Rule Unassign Condition doesn't work (#24890)

This commit is contained in:
Shariq Ansari
2021-04-13 18:52:37 +05:30
committed by GitHub
parent 583a8bf580
commit dd78ffb176

View File

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