[fix] [minor] if difference account blank then fetch from company
diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py
index 56808a4..39c5b4d 100644
--- a/stock/doctype/stock_entry/stock_entry.py
+++ b/stock/doctype/stock_entry/stock_entry.py
@@ -621,8 +621,10 @@
se_child.uom = item_dict[d]["stock_uom"]
se_child.stock_uom = item_dict[d]["stock_uom"]
se_child.qty = flt(item_dict[d]["qty"])
- se_child.expense_account = item_dict[d]["expense_account"]
- se_child.cost_center = item_dict[d]["cost_center"]
+ se_child.expense_account = item_dict[d]["expense_account"] or \
+ webnotes.conn.get_value("Company", self.doc.company, "default_expense_account")
+ se_child.cost_center = item_dict[d]["cost_center"] or \
+ webnotes.conn.get_value("Company", self.doc.company, "cost_center")
# in stock uom
se_child.transfer_qty = flt(item_dict[d]["qty"])
diff --git a/stock/doctype/stock_entry_detail/stock_entry_detail.txt b/stock/doctype/stock_entry_detail/stock_entry_detail.txt
index 4721747..5218c1a 100644
--- a/stock/doctype/stock_entry_detail/stock_entry_detail.txt
+++ b/stock/doctype/stock_entry_detail/stock_entry_detail.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-29 18:22:12",
"docstatus": 0,
- "modified": "2013-10-23 13:46:52",
+ "modified": "2013-10-23 14:35:46",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -69,7 +69,9 @@
"doctype": "DocField",
"fieldname": "item_name",
"fieldtype": "Data",
- "label": "Item Name"
+ "label": "Item Name",
+ "print_hide": 1,
+ "read_only": 1
},
{
"doctype": "DocField",