From e5dfc6c440eb6bd91b5899638ba4c300938a9a0f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 27 Jun 2013 11:45:47 +0530 Subject: [PATCH] [grid] [bom] fixes erpnext #514, #515, wnframework #187 --- manufacturing/doctype/bom/bom.js | 6 +++--- manufacturing/doctype/bom/bom.txt | 3 ++- manufacturing/doctype/bom_item/bom_item.txt | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/manufacturing/doctype/bom/bom.js b/manufacturing/doctype/bom/bom.js index b1f43f7620..d14590cb08 100644 --- a/manufacturing/doctype/bom/bom.js +++ b/manufacturing/doctype/bom/bom.js @@ -44,9 +44,9 @@ var set_operation_no = function(doc) { var op = op_table[i].operation_no; if (op && !inList(operations, op)) operations.push(op); } - - cur_frm.fields_dict["bom_materials"].grid.get_field("operation_no") - .df.options = operations.join("\n"); + + wn.meta.get_docfield("BOM Item", "operation_no", + cur_frm.docname).options = operations.join("\n"); $.each(getchildren("BOM Item", doc.name, "bom_materials"), function(i, v) { if(!inList(operations, cstr(v.operation_no))) v.operation_no = null; diff --git a/manufacturing/doctype/bom/bom.txt b/manufacturing/doctype/bom/bom.txt index 922fd80363..d539ad0338 100644 --- a/manufacturing/doctype/bom/bom.txt +++ b/manufacturing/doctype/bom/bom.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-22 15:11:38", "docstatus": 0, - "modified": "2013-01-29 17:32:53", + "modified": "2013-06-27 11:08:28", "modified_by": "Administrator", "owner": "Administrator" }, @@ -112,6 +112,7 @@ "options": "Specify the operations, operating cost and give a unique Operation no to your operations." }, { + "depends_on": "with_operations", "doctype": "DocField", "fieldname": "bom_operations", "fieldtype": "Table", diff --git a/manufacturing/doctype/bom_item/bom_item.txt b/manufacturing/doctype/bom_item/bom_item.txt index 14be95a336..2554adf21f 100644 --- a/manufacturing/doctype/bom_item/bom_item.txt +++ b/manufacturing/doctype/bom_item/bom_item.txt @@ -2,7 +2,7 @@ { "creation": "2013-02-22 01:27:49", "docstatus": 0, - "modified": "2013-03-07 07:03:18", + "modified": "2013-06-27 11:30:07", "modified_by": "Administrator", "owner": "Administrator" }, @@ -92,6 +92,7 @@ "reqd": 1 }, { + "description": "See \"Rate Of Materials Based On\" in Costing Section", "doctype": "DocField", "fieldname": "rate", "fieldtype": "Float",