Allow Default Warehouse for Item, even if not a Stock Item
This commit is contained in:
parent
e4c434ab6f
commit
6ab831b387
@ -175,7 +175,7 @@
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.is_stock_item==\"Yes\"",
|
||||
"depends_on": "",
|
||||
"description": "Mandatory if Stock Item is \"Yes\". Also the default warehouse where reserved quantity is set from Sales Order.",
|
||||
"fieldname": "default_warehouse",
|
||||
"fieldtype": "Link",
|
||||
@ -825,7 +825,7 @@
|
||||
"icon": "icon-tag",
|
||||
"idx": 1,
|
||||
"max_attachments": 1,
|
||||
"modified": "2014-07-03 10:45:19.574737",
|
||||
"modified": "2014-08-18 09:32:57.268763",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Item",
|
||||
|
@ -67,12 +67,10 @@ def make_packing_list(obj, item_table_fieldname):
|
||||
packing_list_idx = 0
|
||||
parent_items = []
|
||||
for d in obj.get(item_table_fieldname):
|
||||
warehouse = (item_table_fieldname == "sales_order_details") \
|
||||
and d.warehouse or d.warehouse
|
||||
if frappe.db.get_value("Sales BOM", {"new_item_code": d.item_code}):
|
||||
for i in get_sales_bom_items(d.item_code):
|
||||
update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty),
|
||||
warehouse, d, packing_list_idx)
|
||||
d.warehouse, d, packing_list_idx)
|
||||
|
||||
if [d.item_code, d.name] not in parent_items:
|
||||
parent_items.append([d.item_code, d.name])
|
||||
|
Loading…
x
Reference in New Issue
Block a user