fix: get correct warehouse for product bundle (#19130)
This commit is contained in:
parent
5a61880e6a
commit
fdad33309b
@ -20,7 +20,7 @@ def get_product_bundle_items(item_code):
|
||||
|
||||
def get_packing_item_details(item, company):
|
||||
return frappe.db.sql("""
|
||||
select i.item_name, i.description, i.stock_uom, id.default_warehouse
|
||||
select i.item_name, i.is_stock_item, i.description, i.stock_uom, id.default_warehouse
|
||||
from `tabItem` i LEFT JOIN `tabItem Default` id ON id.parent=i.name and id.company=%s
|
||||
where i.name = %s""",
|
||||
(company, item), as_dict = 1)[0]
|
||||
@ -53,7 +53,7 @@ def update_packing_list_item(doc, packing_item_code, qty, main_item_row, descrip
|
||||
if description and not pi.description:
|
||||
pi.description = description
|
||||
if not pi.warehouse:
|
||||
pi.warehouse = (main_item_row.warehouse if ((doc.get('is_pos')
|
||||
pi.warehouse = (main_item_row.warehouse if ((doc.get('is_pos') or item.is_stock_item \
|
||||
or not item.default_warehouse) and main_item_row.warehouse) else item.default_warehouse)
|
||||
|
||||
if not pi.batch_no:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user