mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-15 01:43:10 +00:00
fix(buying): resolve Get Items from Product Bundle by document name
Since Product Bundles became versioned, their names are PB-prefixed and no longer double as the parent item code. The buying dialog kept passing the picked bundle name as `item_code`, so the component lookup (which filters `new_item_code`) matched nothing and the dialog silently added no items. The dialog now sends the selection as `product_bundle` and the endpoint fetches that version's components by document name (rejecting unsubmitted versions); passing `item_code` still resolves the parent item's active version, preserving the legacy contract of the whitelisted endpoint. The picker is also restricted to submitted bundles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -628,7 +628,7 @@ erpnext.buying.get_items_from_product_bundle = function (frm) {
|
||||
method: "erpnext.stock.doctype.packed_item.packed_item.get_items_from_product_bundle",
|
||||
args: {
|
||||
row: {
|
||||
item_code: args.product_bundle,
|
||||
product_bundle: args.product_bundle,
|
||||
quantity: args.quantity,
|
||||
parenttype: frm.doc.doctype,
|
||||
parent: frm.doc.name,
|
||||
|
||||
Reference in New Issue
Block a user