Merge pull request #2569 from nabinhait/fix1

create material request from production planning tool
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
index e219215..f0616de 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
@@ -24,6 +24,13 @@
 	}
 }
 
+cur_frm.cscript.raise_purchase_request = function(doc, cdt, cdn) {
+	return frappe.call({
+		method: "raise_purchase_request",
+		doc:doc
+	})
+}
+
 cur_frm.cscript.download_materials_required = function(doc, cdt, cdn) {
 	return $c_obj(doc, 'validate_data', '', function(r, rt) {
 		if (!r['exc'])
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
index bdfab41..c6ec1e2 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
@@ -1,5 +1,5 @@
 {
- "creation": "2013-01-21 12:03:47.000000", 
+ "creation": "2013-01-21 12:03:47", 
  "default_print_format": "Standard", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -20,6 +20,7 @@
   {
    "fieldname": "fg_item", 
    "fieldtype": "Link", 
+   "in_list_view": 1, 
    "label": "Filter based on item", 
    "options": "Item", 
    "permlevel": 0
@@ -27,6 +28,7 @@
   {
    "fieldname": "customer", 
    "fieldtype": "Link", 
+   "in_list_view": 1, 
    "label": "Filter based on customer", 
    "options": "Customer", 
    "permlevel": 0
@@ -34,6 +36,7 @@
   {
    "fieldname": "company", 
    "fieldtype": "Link", 
+   "in_list_view": 1, 
    "label": "Company", 
    "options": "Company", 
    "permlevel": 0, 
@@ -140,7 +143,7 @@
    "fieldname": "raise_purchase_request", 
    "fieldtype": "Button", 
    "label": "Create Material Requests", 
-   "options": "raise_purchase_request", 
+   "options": "", 
    "permlevel": 0
   }, 
   {
@@ -155,7 +158,7 @@
  "idx": 1, 
  "in_create": 1, 
  "issingle": 1, 
- "modified": "2013-12-20 19:23:25.000000", 
+ "modified": "2015-01-11 21:53:21.253556", 
  "modified_by": "Administrator", 
  "module": "Manufacturing", 
  "name": "Production Planning Tool",