From 347097101684f06f57ebb08568b854e82dfbe691 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 8 Feb 2013 14:46:09 +0530 Subject: [PATCH] fixes in bom and removed asset item check when fetching description --- manufacturing/doctype/bom/bom.js | 2 +- manufacturing/doctype/bom/bom.py | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/manufacturing/doctype/bom/bom.js b/manufacturing/doctype/bom/bom.js index cdb863d0b2..4e8fbc95d1 100644 --- a/manufacturing/doctype/bom/bom.js +++ b/manufacturing/doctype/bom/bom.js @@ -175,7 +175,7 @@ var calculate_total = function(doc) { cur_frm.fields_dict['item'].get_query = function(doc) { return erpnext.queries.item({ - 'ifnull(tabItem.is_manufactured_item, "No")': 'Yes' + 'ifnull(tabItem.is_manufactured_item, "No")': 'Yes', }) } diff --git a/manufacturing/doctype/bom/bom.py b/manufacturing/doctype/bom/bom.py index b4a51cd6e7..809f36a5f2 100644 --- a/manufacturing/doctype/bom/bom.py +++ b/manufacturing/doctype/bom/bom.py @@ -87,9 +87,6 @@ class DocType: msgprint("Item_code: %s in materials tab cannot be same as FG Item", item[0]['name'], raise_exception=1) - if item and item[0]['is_asset_item'] == 'Yes': - msgprint("Item: %s is an asset item, please check", item[0]['name'], raise_exception=1) - if not item or item[0]['docstatus'] == 2: msgprint("Item %s does not exist in system" % item[0]['item_code'], raise_exception = 1) @@ -147,11 +144,11 @@ class DocType: rate = [] for wh in warehouse: r = get_incoming_rate({ - item_code: args.get("item_code"), - warehouse: wh[0], - posting_date: dt, - posting_time: time, - qty: args.get("qty") or 0 + "item_code": args.get("item_code"), + "warehouse": wh[0], + "posting_date": dt, + "posting_time": time, + "qty": args.get("qty") or 0 }) if r: rate.append(r)