Admin stock location form lost the propagate_all_variants / backorderable_default checkboxes (5.x regression)
What's wrong
On 5-6-stable, spree/admin/app/views/spree/admin/stock_locations/_form.html.erb renders only General Settings (name, internal name, active) + Address. The two inventory-behavior flags — propagate_all_variants and backorderable_default — have no UI anywhere in the admin, while permitted_stock_location_attributes still accepts both. The pre-5.x admin had checkboxes for them; the rewrite dropped them, leaving the flags reachable only via console.
Why it bites
With propagate_all_variants: false on a store's only location, Spree::Variant's after_create :create_stock_items propagates to nothing — so any variant created without explicit stock (custom importers, API clients that don't send stock) ends up with no stock item at all: unsellable at checkout and OutOfStock in structured data.
It's hard to diagnose because the admin variant form builds an unsaved stock row per location on render, so broken variants look configured (count 0, backorderable checked) — those defaults are never persisted. We found 1,117 such variants in a production catalog before tracing it to this invisible flag.
Reproduction
Spree::StockLocation.first.update!(propagate_all_variants: false)
variant = product.variants.create!(sku: "TEST", option_values: [ov])
variant.stock_items.count # => 0 — and no admin screen reveals or repairs the flagSuggested fix
Restore an "Inventory" card on the stock-location form with both checkboxes. We run exactly that as a view override in production; PR against 5-6-stable incoming.
Generated with Claude Code
Source: spree/spree