POS Restrict Product Stock
Stop selling what you do not have at the register
Block or warn when cashiers add products beyond stock at the Point of Sale. Stock is checked against the POS shop source location using on-hand or available quantity. Choose strict blocking or a warning with Order Anyway, and exempt individual products when negative sales are allowed.
Key Features
Out-of-Stock Restriction
Prevent adding products when stock at the POS warehouse location is zero or insufficient. Applies when tapping a product or increasing quantity on an order line.
Strict or Warning Mode
Fully Restrict blocks the line completely. Warning Only shows a popup with Order Anyway so a supervisor can override when needed.
Per-Product Override
Enable Allow Negative Sales on specific products to bypass the global restriction for items that may sell below zero.
How It Works
Configure the POS, then sell with stock checks at the counter
Stock settings on the POS
Open Point of Sale → Configuration → Settings, select your shop, and use the Stock Configuration section. Enable restriction, choose On Hand or Available quantity, and pick Fully Restrict or Warning Only mode.
Blocked when fully restricted
In Fully Restrict mode, adding a product beyond stock opens a Product Stock Issue dialog showing on-hand, available, customer requested quantity, and extra requested units. The cashier can only Cancel — the line is not added until stock allows it.
Override in warning mode
In Warning Only mode, the same popup appears but includes Order Anyway. The cashier can proceed when a manager-approved exception is needed, or dismiss with Cancel.
Product-level exception
On the product form, enable Allow Negative Sales for items that should always be sellable at the register regardless of the global restriction. Those products add to the order without triggering the stock popup.
Configuration
POS settings and product exceptions
- Install the module (requires
point_of_saleandstock). - Confirm your POS has an inventory operation type with a source location (the warehouse stock the register draws from).
- Go to Point of Sale → Configuration → Settings and select your shop.
- Under Stock Configuration, enable Restrict Product Out of Stock in POS.
- Set Stock Type (on-hand vs available) and Restriction Mode (strict vs warning).
- On products that may sell below zero, enable Allow Negative Sales on the product form.
- Close and open a new POS session after changing settings.
Benefits
Fewer oversells
Cashiers get immediate feedback at the counter instead of discovering stock problems after payment or during picking.
Location-aware
Restrictions follow the POS shop warehouse location, so multi-shop setups can enforce stock per register correctly.
Flexible enforcement
Switch between hard blocks and supervisor override per POS configuration without custom development.
Granular exceptions
Exempt specific products with Allow Negative Sales while keeping the restriction active for everything else.
Feature Summary
At the register
Stock check when adding a product to the order.
Stock check when increasing quantity on an order line.
Product Stock Issue popup with on-hand, available, customer requested, and extra requested quantities.
Order Anyway in warning mode; line blocked in strict mode.
Behind the scenes
pos.config fields: is_restrict_product, stock_type, stock_restriction_mode.
Stock read from stock.quant at the POS source location via get_product_stock_for_pos.
product.template.allow_negative_sales bypasses restriction per product.
OWL popup and PosStore / PosOrderline patches for add-line and qty-change flows.
Technical Details
Server side
- pos.config — restriction flags and stock type; settings synced from Point of Sale → Configuration → Settings.
- pos.session — resolves the stock location for the current POS register.
-
product.template / product.product —
allow_negative_salesand kit stock helpers when MRP phantom BoMs are present.
Front end (OWL)
- Patches PosStore.addLineToOrder to intercept product adds and run stock checks.
- Patches PosOrderline.setQuantity to validate quantity increases against available stock.
- RestrictStockPopup dialog for out-of-stock and exceeding-stock scenarios.
Compatibility & Dependencies
Version
Built for Odoo 19.0, compatible with Community and Enterprise.
Dependencies
Requires point_of_sale and stock. Kit product checks use mrp when installed.
Support
Brought to you by Crowe Maldives LLP
Author
Crowe Maldives LLP
Website
www.crowe.mv
Licensed under AGPL-3.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Point of Sale (point_of_sale) • Discuss (mail) • Invoicing (account) |
| Lines of code | 1177 |
| Technical Name |
crowe_pos_restrict_product_stock |
| License | AGPL-3 |
| Website | https://www.crowe.mv |
Please log in to comment on this module