fix: Fetch email when making Opportunity from Lead (#18373)
diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js
index cfa7290..122e2b4 100644
--- a/erpnext/crm/doctype/lead/lead.js
+++ b/erpnext/crm/doctype/lead/lead.js
@@ -7,14 +7,8 @@
erpnext.LeadController = frappe.ui.form.Controller.extend({
setup: function () {
this.frm.make_methods = {
- 'Quotation': () => erpnext.utils.create_new_doc('Quotation', {
- 'quotation_to': this.frm.doc.doctype,
- 'party_name': this.frm.doc.name
- }),
- 'Opportunity': () => erpnext.utils.create_new_doc('Opportunity', {
- 'opportunity_from': this.frm.doc.doctype,
- 'party_name': this.frm.doc.name
- })
+ 'Quotation': this.make_quotation,
+ 'Opportunity': this.create_opportunity
}
this.frm.fields_dict.customer.get_query = function (doc, cdt, cdn) {