fix: sider issues

This commit is contained in:
Anupam 2021-08-25 16:35:34 +05:30
parent dfcac64b44
commit c644fbb102
3 changed files with 23 additions and 14 deletions

View File

@ -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(__("Opportunity"), this.make_opportunity, __("Create"));
this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("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(__("Prospect"), this.make_prospect, __("Create"));
this.frm.add_custom_button(__('Add to Prospect'), function() { this.frm.add_custom_button(__('Add to Prospect'), this.add_lead_to_prospect, __('Action'));
cur_frm.trigger('add_lead_to_prospect')
}, __('Action'));
} }
if (!this.frm.is_new()) { if (!this.frm.is_new()) {
@ -77,7 +75,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
}, },
freeze: true, freeze: true,
freeze_message: __('...Adding Lead to Prospect') freeze_message: __('...Adding Lead to Prospect')
}) });
}, __('Add Lead to Prospect'), __('Add')); }, __('Add Lead to Prospect'), __('Add'));
} }

View File

@ -8,7 +8,7 @@ frappe.ui.form.on('Prospect', {
frappe.model.open_mapped_doc({ frappe.model.open_mapped_doc({
method: "erpnext.crm.doctype.prospect.prospect.make_customer", method: "erpnext.crm.doctype.prospect.prospect.make_customer",
frm: cur_frm frm: cur_frm
}) });
}, __("Create")); }, __("Create"));
} }
if (!cur_frm.is_new() && frappe.boot.user.can_create.includes("Opportunity")) { 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({ frappe.model.open_mapped_doc({
method: "erpnext.crm.doctype.prospect.prospect.make_opportunity", method: "erpnext.crm.doctype.prospect.prospect.make_opportunity",
frm: cur_frm frm: cur_frm
}) });
}, __("Create")); }, __("Create"));
} }

View File

@ -15,12 +15,14 @@
"no_of_employees", "no_of_employees",
"currency", "currency",
"annual_revenue", "annual_revenue",
"more_details_section",
"fax", "fax",
"website", "website",
"column_break_13",
"prospect_owner", "prospect_owner",
"leads_section", "leads_section",
"prospect_lead", "prospect_lead",
"addresses_and_contacts_section", "address_and_contact_section",
"address_html", "address_html",
"column_break_17", "column_break_17",
"contact_html", "contact_html",
@ -107,12 +109,6 @@
"fieldtype": "Table", "fieldtype": "Table",
"options": "Prospect Lead" "options": "Prospect Lead"
}, },
{
"depends_on": "eval: !doc.__islocal",
"fieldname": "addresses_and_contacts_section",
"fieldtype": "Section Break",
"label": "Addresses and Contacts"
},
{ {
"fieldname": "address_html", "fieldname": "address_html",
"fieldtype": "HTML", "fieldtype": "HTML",
@ -136,11 +132,26 @@
{ {
"fieldname": "notes", "fieldname": "notes",
"fieldtype": "Text Editor" "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, "index_web_pages_for_search": 1,
"links": [], "links": [],
"modified": "2021-08-19 00:29:00.767038", "modified": "2021-08-25 12:35:00.759909",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "CRM", "module": "CRM",
"name": "Prospect", "name": "Prospect",