Item Default fixes

This commit is contained in:
Nabin Hait
2018-05-23 19:37:06 +05:30
parent d5cb4c10a1
commit 5f861756a2
7 changed files with 29 additions and 20 deletions

View File

@@ -217,7 +217,8 @@ class BuyingController(StockController):
raw_materials_cost = 0
items = list(set([d.item_code for d in bom_items]))
item_wh = frappe._dict(frappe.db.sql("""select i.item_code, id.default_warehouse
from `tabItem` i, `tabItem Default` id where id.company=%s and i.name in ({0})"""
from `tabItem` i, `tabItem Default` id
where id.parent=i.name and id.company=%s and i.name in ({0})"""
.format(", ".join(["%s"] * len(items))), [self.company] + items))
for bom_item in bom_items: