From 873d98be2d8bf9b296c1e70e68c168a9db669a1d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sun, 11 Jan 2015 22:01:34 +0530 Subject: [PATCH] create material request from production planning tool --- .../production_planning_tool/production_planning_tool.js | 7 +++++++ .../production_planning_tool.json | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) 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 e2192157c8..f0616dea68 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.item_code = function(doc,cdt,cdn) { } } +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 bdfab41fba..c6ec1e2bea 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",