Stock Quant Lock
stock_quant_lock · OCA/stock-logistics-workflow
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
view_stock_quant_form_editable_quant_lock— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module adds a quant lock mechanism based on standard stock reservations. When a quant is locked, its non-reserved quantity is reserved by a dedicated stock picking so it cannot be consumed by other operations.
The lock operation is done through a selectable route explicitly configured for quant locking: the push rule of the route defines the operation type, the destination and the grouping of the lock transfer. Unlocking cancels the lock picking, which releases the corresponding reservation while keeping full traceability through standard Odoo stock documents.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 7
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
quant_search_view_quant_lock |
stock.quant.search.quant.lock | stock.quant | search | Inherits stock.quant_search_view |
stock_location_route_form_view |
stock.route.form.quant.lock | stock.route | form | Inherits stock.stock_location_route_form_view |
view_stock_quant_form_editable_quant_lock |
stock.quant.form.editable.quant.lock | stock.quant | form | Inherits stock.view_stock_quant_form_editable |
view_stock_quant_lock_wizard_form |
stock.quant.lock.wizard.form | stock.quant.lock.wizard | form | New |
view_stock_quant_tree_editable_quant_lock |
stock.quant.tree.editable.quant.lock | stock.quant | tree | Inherits stock.view_stock_quant_tree_editable |
view_stock_quant_tree_quant_lock |
stock.quant.tree.quant.lock | stock.quant | tree | Inherits stock.view_stock_quant_tree |
view_warehouse |
stock.warehouse.form.quant.lock | stock.warehouse | form | Inherits stock.view_warehouse |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 5
-
quant_lock_quant_idMany2one → stock.quantcomodel_name='stock.quant'copy=Falseindex=Truestring='Locked quant'
No public methods.
-
is_locked_by_pickingBooleancompute='_compute_is_locked_by_picking'index=Truestore=Truestring='Locked by issue' -
lock_move_countIntegercompute='_compute_lock_move_count' -
lock_move_idsOne2many → stock.movecomodel_name='stock.move'inverse_name='quant_lock_quant_id'readonly=Truestring='Lock Moves'
-
action_open_lock_wizard(self) -
action_unlock_quant(self) -
action_view_lock_moves(self)
-
quant_idsMany2many → stock.quantcomodel_name='stock.quant'readonly=Truestring='Quants' -
route_idMany2one → stock.routecomodel_name='stock.route'domain="[('allow_quant_lock', '=', True)]"required=Truestring='Route'
-
action_lock(self) -
default_get(self, fields_list)
-
allow_quant_lockBooleanhelp='If checked, this route can be used to lock stock quants. The lock transfer is created by the push rule of this route whose source location contains the location of the quant to lock.'string='Allow quant lock'
No public methods.
-
quality_check_route_idMany2one → stock.routecheck_company=Truecomodel_name='stock.route'help='Default route used to lock the quants of the warehouse for a quality check.'ondelete='restrict'string='Quality Check Route'
-
create(self, vals_list)@api.model_create_multi