[fix] buttons for rfq and material request
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
index 32a96bf..726f767 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
@@ -21,7 +21,7 @@
 			{fieldname: 'schedule_date', columns: 2},
 			{fieldname: 'warehouse', columns: 3},
 		];
-		
+
 		frm.get_field('suppliers').grid.editable_fields = [
 			{fieldname: 'supplier', columns: 4},
 			{fieldname: 'contact', columns: 3},
@@ -39,8 +39,12 @@
 
 	refresh: function(frm, cdt, cdn) {
 		if (frm.doc.docstatus === 1) {
-			frm.add_custom_button(__("Make Supplier Quotation"),
-				function(){ frm.trigger("make_suppplier_quotation") });
+			frm.add_custom_button(__("Make"),
+				function(){ frm.trigger("make_suppplier_quotation") }, __("Supplier Quotation"));
+
+			frm.add_custom_button(__("View"),
+				function(){ frappe.set_route('List', 'Supplier Quotation',
+					{'request_for_quotation': frm.doc.name}) }, __("Supplier Quotation"));
 
 			frm.add_custom_button(__("Send Supplier Emails"), function() {
 				frappe.call({
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 68ce231..fea0d7e 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -40,6 +40,7 @@
 	},
 
 	refresh: function(doc) {
+		var me = this;
 		this._super();
 
 		if(doc.docstatus==0) {
@@ -75,6 +76,19 @@
 					cur_frm.add_custom_button(__("Production Order"),
 					this.raise_production_orders, __("Make"));
 
+				// show
+
+				if(doc.material_request_type === "Purchase" && doc.docstatus==1) {
+					me.frm.add_custom_button(__("Request for Quotation"),
+						function() { frappe.set_route('List', 'Request for Quotation',
+						{'material_request': doc.name})}, __("Show"));
+
+					me.frm.add_custom_button(__("Supplier Quotation"),
+						function() { frappe.set_route('List', 'Supplier Quotation',
+						{'material_request': doc.name})}, __("Show"));
+
+				}
+
 				cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
 
 				// stop
diff --git a/erpnext/templates/pages/demo.html b/erpnext/templates/pages/demo.html
index 23a9a21..e1d98a1 100644
--- a/erpnext/templates/pages/demo.html
+++ b/erpnext/templates/pages/demo.html
@@ -1,7 +1,34 @@
 {% extends "templates/web.html" %}
 
 {% block script %}
-	<script>{% include "templates/includes/start.js" %}</script>
+<script>
+$(document).ready(function() {
+    $("#login_btn").click(function() {
+        var me = this;
+        $(this).html("Logging In...").prop("disabled", true);
+        frappe.call({
+            "method": "login",
+            args: {
+                usr: "demo@erpnext.com",
+                pwd: "demo",
+                lead_email: $("#lead-email").val(),
+            },
+            callback: function(r) {
+                $(me).prop("disabled", false);
+                if(r.exc) {
+                    alert("Error, please contact support@erpnext.com");
+                } else {
+                    console.log("Logged In");
+                    window.location.href = "desk";
+                }
+            }
+        })
+        return false;
+    })
+    .prop("disabled", false);
+})
+
+</script>
 {% endblock %}
 
 {% block style %}