From ebb8502e54cbb9dbdfb46d9d95dc00e6bdf6e077 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 26 Dec 2023 13:30:22 +0530 Subject: [PATCH] fix: save lead before creating deal --- crm/fcrm/doctype/crm_lead/crm_lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crm/fcrm/doctype/crm_lead/crm_lead.py b/crm/fcrm/doctype/crm_lead/crm_lead.py index 44e549c5..0f07908d 100644 --- a/crm/fcrm/doctype/crm_lead/crm_lead.py +++ b/crm/fcrm/doctype/crm_lead/crm_lead.py @@ -251,8 +251,8 @@ def convert_to_deal(lead): lead.converted = 1 if lead.sla: lead.communication_status = 'Replied' + lead.save() contact = lead.create_contact(False) deal = lead.create_deal(contact) - lead.save() return deal