diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js index f1b8171349..28aedde122 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.js +++ b/erpnext/crm/doctype/opportunity/opportunity.js @@ -76,6 +76,11 @@ frappe.ui.form.on("Opportunity", { function() { frm.trigger("make_supplier_quotation") }, __('Create')); + + frm.add_custom_button(__('Request For Quotation'), + function() { + frm.trigger("make_request_for_quotation") + }, __('Create')); } frm.add_custom_button(__('Quotation'), @@ -126,6 +131,13 @@ frappe.ui.form.on("Opportunity", { }) }, + make_request_for_quotation: function(frm) { + frappe.model.open_mapped_doc({ + method: "erpnext.crm.doctype.opportunity.opportunity.make_request_for_quotation", + frm: cur_frm + }) + }, + toggle_mandatory: function(frm) { frm.toggle_reqd("items", frm.doc.with_items ? 1:0); }