From c644fbb1023029edd1a30003e14f3dfb5ef4e1fa Mon Sep 17 00:00:00 2001 From: Anupam Date: Wed, 25 Aug 2021 16:35:34 +0530 Subject: [PATCH] fix: sider issues --- erpnext/crm/doctype/lead/lead.js | 6 ++--- erpnext/crm/doctype/prospect/prospect.js | 4 ++-- erpnext/crm/doctype/prospect/prospect.json | 27 +++++++++++++++------- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js index 7f5f1a4cb4..dfb3b094dc 100644 --- a/erpnext/crm/doctype/lead/lead.js +++ b/erpnext/crm/doctype/lead/lead.js @@ -40,9 +40,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller this.frm.add_custom_button(__("Opportunity"), this.make_opportunity, __("Create")); this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("Create")); this.frm.add_custom_button(__("Prospect"), this.make_prospect, __("Create")); - this.frm.add_custom_button(__('Add to Prospect'), function() { - cur_frm.trigger('add_lead_to_prospect') - }, __('Action')); + this.frm.add_custom_button(__('Add to Prospect'), this.add_lead_to_prospect, __('Action')); } if (!this.frm.is_new()) { @@ -77,7 +75,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller }, freeze: true, freeze_message: __('...Adding Lead to Prospect') - }) + }); }, __('Add Lead to Prospect'), __('Add')); } diff --git a/erpnext/crm/doctype/prospect/prospect.js b/erpnext/crm/doctype/prospect/prospect.js index 64256cf31f..814fc2b6db 100644 --- a/erpnext/crm/doctype/prospect/prospect.js +++ b/erpnext/crm/doctype/prospect/prospect.js @@ -8,7 +8,7 @@ frappe.ui.form.on('Prospect', { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.prospect.prospect.make_customer", frm: cur_frm - }) + }); }, __("Create")); } if (!cur_frm.is_new() && frappe.boot.user.can_create.includes("Opportunity")) { @@ -16,7 +16,7 @@ frappe.ui.form.on('Prospect', { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.prospect.prospect.make_opportunity", frm: cur_frm - }) + }); }, __("Create")); } diff --git a/erpnext/crm/doctype/prospect/prospect.json b/erpnext/crm/doctype/prospect/prospect.json index 6f476a6b65..2eb7cde02d 100644 --- a/erpnext/crm/doctype/prospect/prospect.json +++ b/erpnext/crm/doctype/prospect/prospect.json @@ -15,12 +15,14 @@ "no_of_employees", "currency", "annual_revenue", + "more_details_section", "fax", "website", + "column_break_13", "prospect_owner", "leads_section", "prospect_lead", - "addresses_and_contacts_section", + "address_and_contact_section", "address_html", "column_break_17", "contact_html", @@ -107,12 +109,6 @@ "fieldtype": "Table", "options": "Prospect Lead" }, - { - "depends_on": "eval: !doc.__islocal", - "fieldname": "addresses_and_contacts_section", - "fieldtype": "Section Break", - "label": "Addresses and Contacts" - }, { "fieldname": "address_html", "fieldtype": "HTML", @@ -136,11 +132,26 @@ { "fieldname": "notes", "fieldtype": "Text Editor" + }, + { + "fieldname": "more_details_section", + "fieldtype": "Section Break", + "label": "More Details" + }, + { + "fieldname": "column_break_13", + "fieldtype": "Column Break" + }, + { + "depends_on": "eval: !doc.__islocal", + "fieldname": "address_and_contact_section", + "fieldtype": "Section Break", + "label": "Address and Contact" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-08-19 00:29:00.767038", + "modified": "2021-08-25 12:35:00.759909", "modified_by": "Administrator", "module": "CRM", "name": "Prospect",