mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-25 21:05:19 +00:00
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>