[Fix] Minor changes

This commit is contained in:
rohitwaghchaure 2016-03-28 18:52:19 +05:30
parent d3fdbaa261
commit f480f0fd1e

View File

@ -22,9 +22,7 @@ frappe.ui.form.on("Request for Quotation",{
refresh: function(frm, cdt, cdn){ refresh: function(frm, cdt, cdn){
if (frm.doc.docstatus === 1) { if (frm.doc.docstatus === 1) {
frm.add_custom_button(__("Supplier Quotation"), function(){ frm.trigger("make_suppplier_quotation") }, frm.add_custom_button(__("Make Supplier Quotation"), function(){ frm.trigger("make_suppplier_quotation") });
__("Make"));
frm.page.set_inner_btn_group_as_primary(__("Make"));
} }
}, },
@ -33,13 +31,8 @@ frappe.ui.form.on("Request for Quotation",{
var dialog = new frappe.ui.Dialog({ var dialog = new frappe.ui.Dialog({
title: __("For Supplier"), title: __("For Supplier"),
fields: [ fields: [
{"fieldtype": "Link", "label": __("Supplier"), "fieldname": "supplier", "options":"Supplier", {"fieldtype": "Select", "label": __("Supplier"), "fieldname": "supplier", "options":"Supplier",
"get_query": function () { "options": $.map(doc.suppliers, function(d){ return d.supplier }), "reqd": 1 },
return {
query:"erpnext.buying.doctype.request_for_quotation.request_for_quotation.get_supplier",
filters: {'parent': doc.name}
}
}, "reqd": 1 },
{"fieldtype": "Button", "label": __("Make Supplier Quotation"), "fieldname": "make_supplier_quotation", "cssClass": "btn-primary"}, {"fieldtype": "Button", "label": __("Make Supplier Quotation"), "fieldname": "make_supplier_quotation", "cssClass": "btn-primary"},
] ]
}); });