[fix] [minor] get_items function fix
This commit is contained in:
parent
2cdeb3bb7a
commit
97e55710da
@ -609,6 +609,9 @@ class DocType(StockController):
|
|||||||
|
|
||||||
def add_to_stock_entry_detail(self, item_dict, bom_no=None):
|
def add_to_stock_entry_detail(self, item_dict, bom_no=None):
|
||||||
idx = 1
|
idx = 1
|
||||||
|
expense_account, cost_center = webnotes.conn.get_values("Company", self.doc.company, \
|
||||||
|
["default_expense_account", "cost_center"])[0]
|
||||||
|
|
||||||
for d in item_dict:
|
for d in item_dict:
|
||||||
se_child = addchild(self.doc, 'mtn_details', 'Stock Entry Detail',
|
se_child = addchild(self.doc, 'mtn_details', 'Stock Entry Detail',
|
||||||
self.doclist)
|
self.doclist)
|
||||||
@ -621,10 +624,8 @@ class DocType(StockController):
|
|||||||
se_child.uom = item_dict[d]["stock_uom"]
|
se_child.uom = item_dict[d]["stock_uom"]
|
||||||
se_child.stock_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.qty = flt(item_dict[d]["qty"])
|
||||||
se_child.expense_account = item_dict[d]["expense_account"] or \
|
se_child.expense_account = item_dict[d]["expense_account"] or expense_account
|
||||||
webnotes.conn.get_value("Company", self.doc.company, "default_expense_account")
|
se_child.cost_center = item_dict[d]["cost_center"] or cost_center
|
||||||
se_child.cost_center = item_dict[d]["cost_center"] or \
|
|
||||||
webnotes.conn.get_value("Company", self.doc.company, "cost_center")
|
|
||||||
|
|
||||||
# in stock uom
|
# in stock uom
|
||||||
se_child.transfer_qty = flt(item_dict[d]["qty"])
|
se_child.transfer_qty = flt(item_dict[d]["qty"])
|
||||||
|
@ -81,7 +81,7 @@ wn.module_page["Stock"] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype":"Item Price",
|
"doctype":"Item Price",
|
||||||
"label": wn._("Price List"),
|
"label": wn._("Item Price"),
|
||||||
"description": wn._("Multiple Item prices.")
|
"description": wn._("Multiple Item prices.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user