Optimising Odoo Stock Reservation
By default, Odoo reserves stock only after a Sales Order is confirmed. This ensures inventory is allocated only for confirmed deals. However, some businesses need to reserve stock earlier—for example, when handling pre-orders, quotations for priority customers, or industries where demand changes rapidly.
In this article, we’ll show you how to extend Odoo Sales to reserve stock before confirmation using a custom method. We’ll also explain how to release reserved stock if the quotation is cancelled.
Why Reserve Stock Before Confirmation?
Priority customers
Guarantee availability before the deal is finalised.
High-demand items
Prevent overselling or stock-outs.
Internal approvals
Reserve stock while waiting for management/customer approval.
Better planning
Sales and operations teams know that inventory is already blocked.
Default Odoo Limitation
By default, Odoo only reserves stock after a Sales Order is confirmed. Quotations do not block inventory, which can cause issues when multiple users create quotations simultaneously.
Custom Implementation: Reserve Before Confirmation
We extend Odoo with:
- A Reserve Stock button on quotations.
- A custom action_reserve_stock() method to trigger stock rules early.
- An action_confirm() method to Unreserve Stock on Sales Confirmation.
- A custom action_cancel() method to release stock when a quotation is cancelled.
1. Reserve Stock on Quotation
To reserve stock on a quotation, we define a custom action_reserve_stock() method that checks availability and creates stock moves:
Key Highlights of this Method
- Prevents duplicate reservations.
- Pre-checks stock availability (free_qty).
- Only reserves storable products (ignores services/consumables).
- Updates the order state to reservation.
2. Cancel Reservation Method
To release reserved stock when a quotation is cancelled, we override the action_cancel() method:
3. Unreserve Stock on Confirmation
4. Addition of Reserve Stock Button
Finally, we add a Reserve Stock button visible only on draft quotations:
This adds a 'Reserve Stock' button to the Sales Order form view header, visible only when the order is still a quotation (draft).
Workflow in Action
- Create Quotation — Add products, quantities, and the customer.
- Click "Reserve Stock" — The system checks the free quantity, creates stock moves, and blocks the inventory.
- State = Reservation — Sales Order is still a quotation, but stock is already reserved.
- Confirm Order — Delivery order is ready with reserved stock.
Benefits of This Approach
- Prevents overbooking products.
- Adds a controlled early reservation mechanism.
- Gives sales teams confidence when quoting customers.
- Flexible: stock is released automatically if the quotation is cancelled.
Key Takeaways
With these changes, Odoo becomes more flexible for businesses that need early stock allocation. Sales teams can now secure stock at the quotation stage while still keeping a safe rollback mechanism via cancellation.
This customisation bridges the gap between sales flexibility and inventory accuracy, ensuring customers get reliable promises without the risk of overselling.