TIP: You can type at any time to perform a new search.
Sale Block no Stock
sale_block_no_stock · OCA/sale-workflow
- Repository
- OCA/sale-workflow · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Sales/Sales
- Folder size
- 0.11 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/sale-workflow
- Last tracking update
- 2026-08-07 08:42:48
- Authors
- Odoo Community Association (OCA), Moduon
- Maintainers
- Odoo Community Association (OCA), Moduon
- Committers
- Weblate, Ruchir Shukla, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
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.
Code Analysis ⓘ
Views touched (2)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_form |
res.config.settings.view.form.inherit.sale.block | res.config.settings | form | Inherits sale.res_config_settings_view_form |
sale_order_block_wizard_view |
Sale Order Block | sale.order.block.wizard | form | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (5)
New fields (2)
-
sale_line_block_allowed_groupsMany2many → res.groupscomodel_name='res.groups'help='These groups will be able to bypass the block on the Sale Order Lines if the quantity is not enough'string='Allowed Groups to bypass the block' -
sale_line_field_blockMany2one → ir.model.fieldscomodel_name='ir.model.fields'domain=[('model_id.model', '=', 'sale.order.line'), ('name', 'in', ('free_qty_today', 'qty_available_today', 'virtual_available_at_date'))]help='This field will be checked to block the Sale Order Lines if the quantity is not enough'string='Field to compare quantities on Sale Order Lines'
No public methods.
New fields (2)
-
sale_line_block_allowed_groupsMany2manyhelp='These groups will be able to bypass the block on the Sale Order Lines if the quantity is not enough'readonly=Falserelated='company_id.sale_line_block_allowed_groups' -
sale_line_field_blockMany2onehelp='This field will be checked to block the Sale Order Lines if the quantity is not enough'readonly=Falserelated='company_id.sale_line_field_block'
No public methods.
New fields (0)
No new fields.
Public methods (1)-
action_confirm(self)Check the stock of the products before confirming the sale order.
New fields (4)
-
confirmation_allowedBooleancompute='_compute_confirmation_allowed'string='Allowed to confirm' -
is_packaging_adjustableBooleancompute='_compute_is_adjustable'compute_sudo=Truereadonly=Truestore=True -
is_uom_adjustableBooleancompute='_compute_is_adjustable'compute_sudo=Truereadonly=Truestore=True -
sale_line_block_idsOne2many → sale.order.block.wizard.linecomodel_name='sale.order.block.wizard.line'inverse_name='wizard_id'string='Sale Block Lines'
-
action_adjust_packaging_quantity(self)Adjust the quantity of the sale lines to the maximum allowed by the packaging. -
action_adjust_uom_quantity(self)Adjust the quantity of the sale lines to the maximum allowed by the UoM. -
action_move_to_new_order(self)Move the sale lines to a new sale order. -
confirm(self)Confirm the sale orders ignoring next possible wizards.
New fields (11)
-
company_idMany2onereadonly=Truerelated='sale_line_id.order_id.company_id'store=Truestring='Company' -
order_idMany2onereadonly=Truerelated='sale_line_id.order_id'store=Truestring='Sale Order' -
product_idMany2onereadonly=Truerelated='sale_line_id.product_id'store=Truestring='Product' -
product_packaging_allowed_max_qtyFloatcompute='_compute_allowed_max_qty'compute_sudo=Truereadonly=Truestore=Truestring='Max. Qty. (Pkg.)' -
product_packaging_idMany2onereadonly=Truerelated='sale_line_id.product_packaging_id'store=Truestring='Packaging' -
product_packaging_qtyFloatreadonly=Truerelated='sale_line_id.product_packaging_qty'store=Truestring='Qty. (Pkg.)' -
product_uomMany2onereadonly=Truerelated='sale_line_id.product_uom'store=Truestring='UoM' -
product_uom_allowed_max_qtyFloatcompute='_compute_allowed_max_qty'compute_sudo=Truereadonly=Truestore=Truestring='Max. Qty. (UoM)' -
product_uom_qtyFloatreadonly=Truerelated='sale_line_id.product_uom_qty'string='Qty. (UoM)' -
sale_line_idMany2one → sale.order.linecomodel_name='sale.order.line'required=Truestring='Sale Line' -
wizard_idMany2one → sale.order.block.wizardcomodel_name='sale.order.block.wizard'required=Truestring='Wizard'
No public methods.
Loading…
Loading…
- Status
- Open migration PR — not merged yet for this version
- CI status
- checks failing
- Open since
- 173 days ago
- Last activity
- 52 days ago
- Repository
- OCA/sale-workflow
- Pull request
- [19.0][MIG] sale_block_no_stock: Migration to 19.0 (#4181)