mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-14 17:33:09 +00:00
feat(selling): allow disabling a Product Bundle
Un-deprecate the `disabled` checkbox: it is now editable (also after
submit) and parks a bundle version without ceding its active slot, so
re-enabling restores it without re-activation.
- `get_active_product_bundle` (the single resolution entry point) skips
disabled bundles, so every consumer stops treating the item as a bundle
while it is disabled
- the version pickers on transaction item rows and the buying "Get Items
from Product Bundle" dialog filter out disabled bundles
- an explicitly selected disabled version blocks the transaction with a
validation error instead of silently re-packing another version
- Product Bundle Balance report excludes disabled bundles
- list view indicator: Disabled (grey) / Active (green), falling back to
docstatus for drafts, cancelled and inactive submitted versions
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit cf37478870)
# Conflicts:
# erpnext/controllers/selling_controller.py
# erpnext/public/js/controllers/transaction.js
# erpnext/selling/doctype/product_bundle/product_bundle.json
# erpnext/selling/doctype/product_bundle/product_bundle.py
# erpnext/stock/doctype/packed_item/packed_item.py
# erpnext/stock/report/product_bundle_balance/product_bundle_balance.py
This commit is contained in:
@@ -425,7 +425,16 @@ class SellingController(StockController):
|
||||
row.new_item_code
|
||||
for row in frappe.get_all(
|
||||
"Product Bundle",
|
||||
<<<<<<< HEAD
|
||||
filters={"new_item_code": ("in", items_to_fetch), "disabled": 0},
|
||||
=======
|
||||
filters={
|
||||
"new_item_code": ("in", items_to_fetch),
|
||||
"is_active": 1,
|
||||
"docstatus": 1,
|
||||
"disabled": 0,
|
||||
},
|
||||
>>>>>>> cf37478870 (feat(selling): allow disabling a Product Bundle)
|
||||
fields="new_item_code",
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user