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

Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
Shariq Ansari 2021-02-11 13:41:10 +05:30 committed by GitHub
parent 47f784aa9c
commit a46a83b476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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