fix: creation of contact, customer, opportunity, quotation and prospect from lead --prettier

This commit is contained in:
Nihantra Patel
2024-06-24 16:03:39 +05:30
parent 8304d19e8b
commit 5844897c34

View File

@@ -28,27 +28,11 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
erpnext.toggle_naming_series();
if (!this.frm.is_new() && doc.__onload && !doc.__onload.is_customer) {
this.frm.add_custom_button(
__("Customer"),
this.make_customer.bind(this),
__("Create")
);
this.frm.add_custom_button(
__("Opportunity"),
this.make_opportunity.bind(this),
__("Create")
);
this.frm.add_custom_button(
__("Quotation"),
this.make_quotation.bind(this),
__("Create")
);
this.frm.add_custom_button(__("Customer"), this.make_customer.bind(this), __("Create"));
this.frm.add_custom_button(__("Opportunity"), this.make_opportunity.bind(this), __("Create"));
this.frm.add_custom_button(__("Quotation"), this.make_quotation.bind(this), __("Create"));
if (!doc.__onload.linked_prospects.length) {
this.frm.add_custom_button(
__("Prospect"),
this.make_prospect.bind(this),
__("Create")
);
this.frm.add_custom_button(__("Prospect"), this.make_prospect.bind(this), __("Create"));
this.frm.add_custom_button(__("Add to Prospect"), this.add_lead_to_prospect, __("Action"));
}
}