Prevent Negative Stock | Block Deliveries Without Stock | Odoo Disallow Negative Inventory
by CODEerts https://www.codeerts.com
Inventory: no more stock below zero Stock that was never on the shelf cannot leave it.Odoo validates a delivery even when the location does not hold the goods, and the quantity on hand goes below zero. This module checks the final stock when a transfer is validated and refuses it, with a message that names the product, the location and the missing quantity. ✓Refuses any validation that would leave an internal location below zero ✓Checks the exact lot, package and owner that was taken ✓Deliveries, internal transfers, scraps and manufacturing consumption ✓Allow Negative Stock per location or per product category when you need it | Odoo 20·Community & Enterprise ![]() |
0 units below zero by accident | 2 places to allow exceptions | Lot package and owner aware | 0 settings to switch on |
A stock check at the moment of validation
Nothing changes in how people work, until a transfer takes more than the location holds.
01 The checkOn every validation.
| 02 The messageWhat to fix, in one line.
| 03 ExceptionsWhere negative stock is fine.
|
A delivery without the stock behind it
Every picture is the real module on a demo database.
![]() A quantity typed by handFive drills on a delivery, the done quantity entered although WH/Stock holds none. | ![]() Validation refusedThe message names the product, the location and the five units that would be missing. |
![]() An exception per locationAllow Negative Stock sits on the internal location form, off by default. | ![]() An exception per categoryOr allow it for one product category, such as service parts counted later. |
Three steps, most of them already done
Install the moduleFrom that moment every validation is checked. There is nothing to switch on. |
Validate as usualTransfers with enough stock go through as before. The others are refused with a clear message. |
Allow exceptions if neededAn Inventory Administrator ticks Allow Negative Stock on a location or a product category. |
What it needs, and what it never does
Version 20.0 | License OPL-1 | Editions Community & Enterprise | Dependencies Inventory |
Requirements✓Odoo 20, Community or Enterprise ✓Depends only on Inventory ✓No settings to configure ✓Technical name codeerts_stock_no_negative | Rules✓Internal locations of storable products only ✓Consumables and customer or vendor locations are not checked ✓A category option does not apply to its child categories ✓Point of Sale leaves a delivery that would go negative open, for a check in Inventory |
Frequently asked questions
When someone types a done quantity by hand, Odoo validates the transfer even if the location does not hold it, and the quantity on hand goes below zero. There is no setting in Odoo to stop that. This module adds the check at validation.
The transfer is not validated. A message names the product, the lot if there is one, the location and how many units would be missing, so the user can correct the quantity or the source location.
Yes. Tick Allow Negative Stock on an internal location, or on a product category, and stock there may go below zero as in standard Odoo. The category option applies to that category only, not to its child categories.
Only Inventory Administrators see the Allow Negative Stock options. Changing the option on a product category also needs the right to edit product categories.
Yes. The check uses the lot, package and owner of each line. When a lot is short, Odoo takes the rest from untracked stock in the same place; that untracked stock is checked too.
A Point of Sale order is never blocked at the till. If its delivery would take stock below zero, Odoo's Point of Sale leaves that delivery open instead of validating it, so it can be checked in Inventory.
Yes. It depends only on the Inventory app.

About CODEerts
Full-Service Odoo ERP Company · Solutions That Scale
Every module in our store is built from real client work, tested in production and maintained long-term by a team of experienced Odoo consultants. When you need more than an app, we deliver the full solution.
01 Implementation Full Odoo roll-outs from requirements to go-live, across any industry and company size. | 02 Custom Development Bespoke modules, OWL components and business logic built precisely to your workflow. | 03 Migrations Zero-data-loss upgrades from older Odoo versions with full custom module porting. |
04 Integrations Payment gateways, shipping carriers, biometric devices, eCommerce and third-party APIs. | 05 Odoo Audits Performance, security and code-quality reviews that surface risks before they become problems. | 06 Support & Training Ongoing helpdesk, user training and monthly retainers so your team stays productive. |
Odoo Experts | 6+ Years | 150+ Projects | 10+ Industries | 230+ Published Apps |
More from CODEerts
Other apps we build to make Odoo do more. Tap any card to open it on the Odoo Apps Store.
Archive Anything | Transaction Flow Visualizer | Smart Mail Rebrand | Duplicate Record Detector |
AI Dashboard Builder | Advance Payment Pro | Dual Book & Tax Depreciation | Smart Duplicate Detector |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 100 |
| Technical Name |
codeerts_stock_no_negative |
| License | OPL-1 |
| Website | https://www.codeerts.com |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.





Please log in to comment on this module