From c8c67f7807c9c50940357ab4f2641b9ffea133d5 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 15 Jan 2015 13:11:27 +0530 Subject: [PATCH] Bom operations and item link removed. Cost recalculated on removal of operation or rew material row. --- erpnext/manufacturing/doctype/bom/bom.js | 37 +++++-------------- erpnext/manufacturing/doctype/bom/bom.py | 13 +++---- .../doctype/bom_item/bom_item.json | 14 +------ 3 files changed, 18 insertions(+), 46 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 7dedface675..a5d500f87c0 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -13,9 +13,6 @@ cur_frm.cscript.refresh = function(doc,dt,dn){ cur_frm.add_custom_button(__("Update Item Description"), cur_frm.cscript.update_item_desc, "icon-tag", "btn-default"); } - - cur_frm.cscript.with_operations(doc); - erpnext.bom.set_operation(doc); } cur_frm.cscript.update_cost = function() { @@ -37,29 +34,6 @@ cur_frm.cscript.update_item_desc = function() { } }) } - -cur_frm.cscript.with_operations = function(doc) { - cur_frm.fields_dict["items"].grid.set_column_disp("operation", doc.with_operations); - cur_frm.fields_dict["items"].grid.toggle_reqd("operation", doc.with_operations); -} - -erpnext.bom.set_operation = function(doc) { - var op_table = doc["operations"] || []; - var operations = []; - - for (var i=0, j=op_table.length; i