fix: cannot convert to deal

This commit is contained in:
Shariq Ansari 2023-12-26 13:23:35 +05:30
parent 38cf406c05
commit 65cd4467b0
2 changed files with 2 additions and 1 deletions

View File

@ -249,6 +249,8 @@ def convert_to_deal(lead):
lead = frappe.get_cached_doc("CRM Lead", lead)
lead.status = "Qualified"
lead.converted = 1
if lead.sla:
lead.communication_status = 'Replied'
contact = lead.create_contact(False)
deal = lead.create_deal(contact)
lead.save()

View File

@ -376,7 +376,6 @@ function getParsedFields(sections) {
}
async function convertToDeal() {
updateField('communication_status', 'Replied')
let deal = await call('crm.fcrm.doctype.crm_lead.crm_lead.convert_to_deal', {
lead: lead.data.name,
})