This module extends the functionality of Sales to support blocking sales and to allow you to ensure you are capable to send product you have in stock.
When a Sale Order is going to be confirmed, it will be checked if the quantity demanded exceeds that of the field selected in the configuration, and in this case a wizard will appear to allow you to fix quantities indicating what is the maximum quantity that can be ordered.
Then, you can adjust UoM quantities, Packaging quantities or move remaining unfixed lines to a new order.
If the user who is confirming an order has a group that is allowed, an extra option to confirm the Order with errors will appear on the Wizard.
This module only can block lines with product type 'product' (storable products).
Internal notes will be posted on sales when adjusting quantities or moving to another orders.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Blocks confirming a sales order when storable products are not sufficiently available, showing a wizard to adjust quantities, move lines to a new order, or confirm anyway if allowed.
This module prevents users from confirming a sales order when the ordered quantity of storable products exceeds the stock-related field chosen in the settings.
In Sales settings, under "Blocking sales due to lack of stock", you pick which quantity field on sale order lines is compared (available today, free today, or forecast at date) and which user groups may bypass the block.
When a user confirms an order and some lines exceed that quantity, Odoo does not confirm it; instead a "Sale Order Blocked to Confirm" wizard opens listing the blocked lines with the ordered quantity, the maximum allowed quantity, and packaging information when packaging is used.
From the wizard you can: - Adjust UoM Quantity: reduce each blocked line to the maximum allowed quantity. - Adjust Packaging Quantity: reduce packaging quantities and the matching ordered quantity. - Move to New Order: copy the order and move the blocked lines into the new one, with links posted in both orders' chatter. - Confirm anyway: only visible to users in the allowed groups; it confirms the order and posts an internal note saying the order was confirmed with errors.
Each adjustment posts an internal note on the sales order showing the product and the old and new quantities. The wizard only handles storable products; other lines are ignored. The wizard is temporary and is cleaned up after 15 minutes.
Depends on
Models and fields (5)
- sale.order · extends an existing model
- res.company · extends an existing modelsale_line_field_block (Field to compare quantities on Sale Order Lines), sale_line_block_allowed_groups (Allowed Groups to bypass the block)
- res.config.settings · extends an existing modelsale_line_field_block, sale_line_block_allowed_groups
- sale.order.block.wizard · new modelis_uom_adjustable, sale_line_block_ids (Sale Block Lines), confirmation_allowed (Allowed to confirm), is_packaging_adjustable
- sale.order.block.wizard.line · new modelorder_id (Sale Order), wizard_id (Wizard), company_id (Company), product_id (Product), product_uom (UoM), sale_line_id (Sale Line), product_uom_qty (Qty. (UoM)), product_packaging_id (Packaging), product_packaging_qty (Qty. (Pkg.)), product_uom_allowed_max_qty (Max. Qty. (UoM)), product_packaging_allowed_max_qty (Max. Qty. (Pkg.))
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 3 confirmed, 6 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/sale-workflow.
terminal Installation and usage
OCA documentation · Odoo 18.0Configuration
Source · Odoo 18.0To configure this module, you need to:
- Go to Settings > Sales > Quotations & Orders > Blocking sales due to lack of stock
- Fill Field to compare against the quantity demanded. Possible values:
- virtual_available_at_date: Planned quantity to be in stock on the day of delivery
- qty_available_today: Quantity available in stock today
- free_qty_today: Quantity available without reserve in stock
- Fill Groups allowed to bypass the block
Usage
Source · Odoo 18.0To use this module, you need to:
- Go to Settings > Sales > Quotations & Orders > Blocking sales due to lack of stock
- Fill Field to compare against the quantity demanded: This field will be used to check if the quantity demanded is less than or equal to the value marked in this field. Set it to virtual_available_at_date for this test.
- Fill Groups allowed to bypass the block: These groups will allow the blocking to be bypassed if the quantity demanded exceeds the quantity we want to check. Leave it blank to not allow any group to bypass that restriction.
- Create a Product and set it to be storable.
- Create a Purchase Order for the product and confirm it. Set the Picking Schedule Date on 3 days.
- Create a Sale Order with the product and set the Commitment Date on 2 days. Confirm it and check the wizard.
- Click on Ajust UoM Quantity and see the order has been modified to match forecasted quantity.
No verified information in OCA: Installation.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.