KamoCRM

One stock count per product per place, shared by orders, the Stock view and settings

Featurekamo-shared-library
Shipped
November 8, 2026 at 3:34 AM UTC
Author
Kamo
Commit
b0fb8a1

Retail had two stock systems: orders held and took from InventoryPool, while the market settings Inventory tab managed commerce_stock_levels, which no order ever read. Stock now lives only in InventoryPool, through the new StockService: - InventoryPool gains location_id (one of the organization's inventory locations) and low_stock_threshold (reorder point; default 5 when unset). - Every change is written to the stock history (commerce_stock_adjustments, now keyed by inventory_pool_id): counts set or adjusted by a member (with who and why), sales, returns. - A paid order now takes items off on hand as well as available (before, sold items read as "held" forever); an approved return puts them back on both, on the row they were sold from. - The market stock list is one fetch-joined, org-scoped statement; the market filter actually works (the item's market was never set). New indexes on items(org, offering), pools(item), pools(location), adjustments(pool, date). - RetailService stock-level methods are retired; StockLevel stays only as the provider sync value object, and its table stays in place, unused. A location with stock or shipments on it can no longer be deleted. - Retail customers of a market are read through the engagement market index instead of every account of the organization, and carry name, email and phone.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing