Stock Move Quantity Restriction
by Odoo DevHouse https://apps.odoo.com/apps/modules/browse?author=Odoo%20DevHouse$ 50.00
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 103 |
| Technical Name |
stock_move_qty_restriction |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/modules/browse?author=Odoo%20DevHouse |
| Versions | 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 103 |
| Technical Name |
stock_move_qty_restriction |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/modules/browse?author=Odoo%20DevHouse |
| Versions | 18.0 19.0 |
Stock Move Quantity Restriction - Block Excess Quantity on Transfers
Prevent over-delivery and over-receipt by blocking transfer validation when the done quantity exceeds the demand. Configure per Operation Type and get an instant warning showing every offending product line - strict quantity control for your logistics process.
In standard Odoo, users can validate a transfer even when the done quantity is greater than the ordered demand - no warning, no block, no review.
This lack of control creates serious issues for businesses:
- Warehouse staff can ship or receive more than what was ordered without any alert
- Over-deliveries result in invoice disputes, customer complaints, and return logistics
- Over-receipts inflate stock levels and distort inventory valuations
- No mechanism to enforce that shipped quantity equals demand quantity
- Difficult to maintain strict quantity control in high-volume warehouses
- Quantity mismatches discovered after the fact - when it is too late to correct
- Management has no visibility into quantity discrepancies before they are committed
This module adds a Block Excess Quantity toggle on each Operation Type (Receipts, Deliveries, Internal Transfers). When enabled, clicking Validate on a transfer checks every move line - if any done quantity exceeds its demand, validation is immediately blocked and a clear warning dialog lists every offending product with its Demand and Done Quantity. The user must go back and correct the quantities before proceeding. Zero configuration beyond toggling the field - works instantly on any operation type.
- Per-Operation-Type Policy: Enable or disable excess quantity blocking independently on each operation type (Receipts, Deliveries, etc.)
- Hard Block on Validate: Transfer validation is fully blocked - no way to bypass or confirm through the restriction
- Warning Wizard: A clear popup dialog lists every product line where done quantity exceeds demand
- Product-Level Detail: Wizard shows Product, Demand Quantity, Done Quantity, and Unit of Measure for each excess line
- Precise Comparison: Uses Odoo's float_compare with UoM rounding precision - no false positives from floating-point differences
- Covers All Transfer Types: Works on Receipts, Delivery Orders, Internal Transfers, Returns - any picking type
- Zero Extra Clicks When Not Triggered: When all quantities are within demand, validation proceeds normally with no interruption
- Simple Configuration: One checkbox on the Operation Type form - no complex setup required
- Compatible with Backorder Workflow: Integrates cleanly with Odoo's standard backorder creation flow
- Odoo 18 & 19 Ready: Available for both Odoo Community and Enterprise editions
1. Enable Block Excess Quantity on the Operation Type
Inventory → Configuration → Operation Types → Open a type (e.g. Receipts) → Toggle Block Excess Quantity.
2. Create a Transfer - Enter Quantities Exceeding Demand
Inventory → Receipts → New → Fill in products. Set a Done Quantity greater than the Demand and click Validate.
3. Validation Blocked - Warning Wizard Appears
The system blocks validation and opens a warning dialog listing every product line where done quantity exceeds demand.
4. Correct the Quantities - Validate Successfully
Close the dialog, correct the done quantities to match or stay within demand, then Validate - transfer completes normally.
Installation & Configuration
- Install the Module: Install through Odoo Apps or manually copy to your addons path
- Dependencies: Requires only the
stockmodule - no extra dependencies - Restart Server & Update: Restart Odoo and update the app list
- Configure Operation Types: Go to Inventory → Configuration → Operation Types → Open the desired type → Enable Block Excess Quantity
- Test: Create a transfer, set a done quantity above demand, click Validate - the warning wizard should appear
Step 1: Configure the Operation Type
Go to Inventory → Configuration → Operation Types. Open the operation type you want to restrict (e.g. Receipts, Delivery Orders). Enable the "Block Excess Quantity" checkbox. Save the form. This setting is per-operation-type, so you can enable it only on specific types that require strict quantity control.
Step 2: Create or Open a Transfer
Go to the corresponding operation (e.g. Inventory → Receipts). Create a new transfer or open an existing one. Fill in the product lines with their quantities. The Demand column shows the ordered quantity. The Done column shows what is being processed.
Step 3: Click Validate
Click the Validate button. If all done quantities are within demand, the transfer completes normally with no interruption. If any done quantity exceeds its demand, the system immediately blocks validation and opens the Excess Quantity warning dialog.
Step 4: Review the Warning Wizard
The Excess Quantity Detected dialog lists every product line where the done quantity is greater than the demand:
- Product: The product with a quantity mismatch
- Demand: The originally ordered quantity
- Done Quantity: The quantity currently entered (exceeds demand)
- UoM: The unit of measure for context
Click Close to dismiss the dialog. The transfer is NOT validated - you are returned to the transfer form.
Step 5: Correct and Validate
Adjust the done quantities on the flagged lines so they do not exceed the demand. Once all lines are within limit, click Validate again - the transfer will complete normally. If you need to process more than the demand quantity, either update the demand first or disable the Block Excess Quantity setting on the operation type for that session.
Pro Tip - Selective Restriction
Enable Block Excess Quantity only on operation types that require strict control - for example, Receipts and Delivery Orders - while leaving Internal Transfers unrestricted for flexible warehouse moves. This gives you the right balance between control and operational flexibility.
Note - Immediate Demand Quantities Only
The check compares the move's Done Quantity against its Demand (Initial Demand) at the moment of validation. If you need to legitimately receive or ship more than the original demand, update the demand quantity on the move line before validating, or disable the restriction on the operation type.
Purchase Order Compliance
Ensure received quantities never exceed purchase order lines - prevent overstocking and supplier invoice disputes.
Sales Order Fulfilment
Block over-delivery on outgoing shipments - ship exactly what was ordered, no more, to avoid billing and return issues.
Regulated Industries
Pharmaceuticals, food & beverage, chemicals - where exact batch quantities are legally required and over-shipment has compliance consequences.
High-Value Products
Electronics, jewelry, luxury goods - where every unit counts and accidental extra shipments have significant financial impact.
Contract Manufacturing
Ensure components consumed in production never exceed the manufacturing order quantities - critical for cost control and BOM accuracy.
Multi-Warehouse Operations
Enforce quantity discipline across all warehouses and locations - standardize pick and pack accuracy at scale.
Prevent Over-Delivery
Stop excess shipments before they leave the warehouse - protect customer relationships and avoid costly returns.
Accurate Stock Levels
Prevent over-receipt from inflating inventory counts - keep stock levels aligned with what was actually ordered.
Reduced Errors
Catch quantity mistakes at the point of entry - before they reach the customer or affect financial records.
Operational Discipline
Train warehouse staff to work precisely within demand quantities - build a culture of accuracy and accountability.
Do You Need Assistance or Have a Feature Request?
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