minor
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 35b1bed..5d29096 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -20,4 +20,4 @@
execute:webnotes.reload_doc('support', 'doctype', 'newsletter') # 2014-01-31
execute:webnotes.reload_doc('hr', 'doctype', 'employee') # 2014-02-03
execute:webnotes.conn.sql("update tabPage set module='Core' where name='Setup'")
-execute:patches.4_0.fields_to_be_renamed
+erpnext.patches.4_0.fields_to_be_renamed
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 5de856d..8bd00b6 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -121,7 +121,7 @@
user_default_warehouse_list = get_user_default_as_list('warehouse')
user_default_warehouse = user_default_warehouse_list[0] \
if len(user_default_warehouse_list)==1 else ""
-
+
out = webnotes._dict({
"item_code": item.name,
"item_name": item.item_name,
@@ -132,7 +132,7 @@
"expense_account": item.expense_account or args.expense_account \
or webnotes.conn.get_value("Company", args.company, "default_expense_account"),
"cost_center": item.selling_cost_center \
- if args.transaction_type == "selling" else args.buying_cost_center,
+ if args.transaction_type == "selling" else item.buying_cost_center,
"batch_no": None,
"item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
item_bean.doclist.get({"parentfield": "item_tax"})))),