Merge pull request #22973 from marination/opportunity-from-email-fix

fix: Creating opportunity from email
This commit is contained in:
Deepesh Garg
2020-08-10 16:12:00 +05:30
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -334,7 +334,7 @@ def make_opportunity_from_communication(communication, ignore_communication_link
opportunity = frappe.get_doc({ opportunity = frappe.get_doc({
"doctype": "Opportunity", "doctype": "Opportunity",
"opportunity_from": opportunity_from, "opportunity_from": opportunity_from,
"lead": lead "party_name": lead
}).insert(ignore_permissions=True) }).insert(ignore_permissions=True)
link_communication_to_document(doc, "Opportunity", opportunity.name, ignore_communication_links) link_communication_to_document(doc, "Opportunity", opportunity.name, ignore_communication_links)

View File

@@ -13,7 +13,7 @@ frappe.ui.form.on("Communication", {
frappe.confirm(__(confirm_msg, [__("Issue")]), () => { frappe.confirm(__(confirm_msg, [__("Issue")]), () => {
frm.trigger('make_issue_from_communication'); frm.trigger('make_issue_from_communication');
}) })
}, "Make"); }, "Create");
} }
if(!in_list(["Lead", "Opportunity"], frm.doc.reference_doctype)) { if(!in_list(["Lead", "Opportunity"], frm.doc.reference_doctype)) {