Exhaustive Stock Inventories
stock_inventory_location · OCA/stock-logistics-warehouse
-
Security25/25No findings
-
Activity0/25Last human commit 128 months ago
-
Required by15/251 module depends on it
-
Maturity5/25In 1 Odoo series since 7.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Migrating to 19.0: only `__manifest__.py` is recognized: a module with `__openerp__.py` is not detected at all. migration-openerp-manifest · source
FillInventoryWizard— Class 'FillInventoryWizard' still inherits from the old-style `orm.TransientModel` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceFillInventoryWizard— Class 'FillInventoryWizard' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceStockInventory— Class 'StockInventory' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. (4 occurrences in this file) migration-old-api-base · sourceStockInventory— Class 'StockInventory' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. (3 occurrences in this file) migration-old-style-fields · sourcestock_inventory_location_form_view— 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- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) migration-openerp-import · source
- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) (5 occurrences in this file) migration-openerp-import · source
- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) migration-openerp-import · 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
Let users make exhaustive Inventories
Standard Physical Inventories in OpenERP only contain a generic list of products by locations, which is well suited to partial Inventories and simple warehouses. When the a standard Inventory is confirmed, only the products in the inventory are checked. If a Product is present in the computed stock and not in the recorded Inventory, OpenERP will consider that it remains unchanged.
But for exhaustive inventories in complex warehouses, it is not practical:
- you want to avoid Stock Moves to/from these Locations while counting goods
- you must make sure all the locations you want have been counted
- you must make sure no other location has been counted by mistake
- you want the computed stock to perfectly match the inventory when you confirm it.
This module lets choose whether an Physical Inventory is exhaustive or standard. For an exhaustive Inventory:
- in the state "Draft" you define the Location where goods must be counted.
- the new Inventory status "Open" lets you indicate that the list of Locations is final and you are now counting the goods. In that status, no Stock Moves can be recorded in/out of the Inventory's Locations.
- if the Location or some of it's children have not been entered in the Inventory Lines, OpenERP warns you when you confirm the Inventory.
- only the Inventory's Location or its children can be entered in the Inventory Lines.
- every good that is not in the Inventory Lines is considered lost, and gets moved out of the stock when you confirm the Inventory.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 4
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
stock_inventory_location_form_view |
stock.inventory.location.form | stock.inventory | form | Inherits stock.view_inventory_form |
view_confirm_uninventoried_location |
stock.inventory.uninventoried.locations.form | stock.inventory.uninventoried.locations | form | New |
view_inventory_complete_filter |
complete.inventory.filter | stock.inventory | Inherits stock.view_inventory_filter | |
view_stock_fill_inventory_location |
Import Inventory | stock.fill.inventory | Inherits stock.view_stock_fill_inventory |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 5
No new fields.
Public methods (1)-
default_get(self, cr, uid, fields, context=None)Get 'location_id' and 'exhaustive' from the inventory
No new fields.
Public methods (4)-
action_done(self, cr, uid, ids, context=None)Don't allow to make an inventory with a date in the future. This makes sure no stock moves will be introduced between the moment you finish the inventory and the date of the Stock Moves. Backported from trunk-wms: revid:qdp-launchpad@openerp.com-20140317090656-o7lo22tzm8yuv3r8 @raise osv.except_osv: We raise this exception on purpose instead of ExhaustiveInventoryException to ensure forward-compatibility with v8. -
action_open(self, cr, uid, ids, context=None)Change the state of the inventory to 'open' -
confirm_missing_locations(self, cr, uid, ids, context=None)Open wizard to confirm empty locations on exhaustive inventories -
get_missing_locations(self, cr, uid, ids, context=None)Compute the list of location_ids which are missing from the lines Here, "missing" means the location is the inventory's location or one of it's children, and the inventory does not contain any line with this location.
No new fields.
Public methods (1)-
onchange_location_id(self, cr, uid, ids, inventory_location_id, exhaustive, location_id, context=None)Warn if the new is not in the location list for this inventory.
No new fields.
Public methods (3)-
create(self, cr, uid, vals, context=None)Refuse create if an inventory is being conducted at the parent -
unlink(self, cr, uid, ids, context=None)Refuse unlink if an inventory is being conducted -
write(self, cr, uid, ids, vals, context=None)Refuse write if an inventory is being conducted
No new fields.
Public methods (0)No public methods.