TIP: You can type at any time to perform a new search.
Stock Quant History
stock_quant_history · OCA/stock-logistics-reporting
Security findings
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `DELETE FROM stock_quant_history where quantity = 0 and snapshot_id = %s` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- OCA/stock-logistics-reporting · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Uncategorized
- Folder size
- 0.11 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/stock-logistics-reporting
- Last tracking update
- 2026-08-07 08:42:55
- Authors
- Odoo Community Association (OCA), Pierre Verkest <pierreverkest84@gmail.com>
- Maintainers
- Odoo Community Association (OCA), Pierre Verkest <pierreverkest84@gmail.com>
- Committers
- OCA-git-bot, oca-ci, bosd
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
This module allows regenerate stock.quant as it was for a given date. All stock quant history re-generated for a given date are called snapshot. To generate the first snapshot this module assume all stock.move.line are present in the database. Next snapshot is computed based on the previous snapshot present in the database.
Code Analysis
Views touched (6)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_stock_quant_history_list |
stock.quant.history.list | stock.quant.history | list | New |
view_stock_quant_history_pivot |
stock.quant.history.pivot | stock.quant.history | pivot | New |
view_stock_quant_history_search |
stock.quant.history.search | stock.quant.history | search | New |
view_stock_quant_history_snapshot_form |
stock.quant.history.snapshot.form | stock.quant.history.snapshot | form | New |
view_stock_quant_history_snapshot_list |
stock.quant.history.snapshot.list | stock.quant.history.snapshot | list | New |
view_stock_quant_history_snapshot_search |
stock.quant.history.snapshot.search | stock.quant.history.snapshot | search | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (2)
New fields (9)
-
company_idMany2onereadonly=Truerelated='location_id.company_id'store=Truestring='Company' -
inventory_dateDatetimeindex=Truerelated='snapshot_id.inventory_date'store=True -
location_idMany2one → stock.locationauto_join=Truecheck_company=Trueindex=Trueondelete='restrict'readonly=Truerequired=True args: 'stock.location', 'Location' -
lot_idMany2one → stock.lotcheck_company=Trueindex=Trueondelete='restrict'readonly=True args: 'stock.lot', 'Lot/Serial Number' -
product_idMany2one → product.productcheck_company=Trueindex=Trueondelete='restrict'readonly=Truerequired=True args: 'product.product', 'Product' -
product_tmpl_idMany2one → product.templatereadonly=Truerelated='product_id.product_tmpl_id'string='Product Template' args: 'product.template' -
product_uom_idMany2one → uom.uomreadonly=Truerelated='product_id.uom_id' args: 'uom.uom', 'Unit of Measure' -
quantityFloathelp='Quantity of products in this quant, in the default unit of measure of the product'readonly=True -
snapshot_idMany2one → stock.quant.history.snapshotcomodel_name='stock.quant.history.snapshot'help='Snapshot settings used to generate this line'index=Trueondelete='cascade'required=Truestring='Snapshot settings'
No public methods.
New fields (6)
-
generated_dateDatetimecopy=Falsehelp='Date when stock.quant.history line have been created.'readonly=Truestring='Generated date' -
inventory_dateDatetimehelp='The date used to create stock.quant.history as it was for the given date'readonly=Truerequired=Truestring='Inventory date' -
nameCharcompute='_compute_name' -
previous_snapshot_idMany2one → stock.quant.history.snapshotcomodel_name='stock.quant.history.snapshot'help='Base snapshot used to generate this snapshot'readonly=Truestring='Snapshot base' -
stateSelectioncopy=Falsedefault='draft'readonly=Truerequired=Trueselection=[('draft', 'Draft'), ('generated', 'Generated')]string='Status' -
stock_quant_history_idsOne2many → stock.quant.historycomodel_name='stock.quant.history'help='Generated stock quant history for current snapshot settings.'inverse_name='snapshot_id'string='Stock quant history'
-
action_generate_stock_quant_history(self) -
action_related_stock_quant_history_tree_view(self)
Loading…
Loading…