| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Purchase (purchase)
• Invoicing (account) • Discuss (mail) • Inventory (stock) |
| Lines of code | 2465 |
| Technical Name |
warehouse_costing |
| License | OPL-1 |
| Website | https://www.cds-solutions.co |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Purchase (purchase)
• Invoicing (account) • Discuss (mail) • Inventory (stock) |
| Lines of code | 2465 |
| Technical Name |
warehouse_costing |
| License | OPL-1 |
| Website | https://www.cds-solutions.co |
Warehouse Costing
Independent FIFO · AVCO · FEFO cost layers per warehouse — with full negative-stock prevention, PPV stamping, landed-cost distribution, and automated inter-warehouse transfer accounting.
▸ Overview
One Module · Full Warehouse Cost Isolation
Odoo's native costing collapses all stock into a single global pool. This module unlocks truly independent valuation layers per physical warehouse — each warehouse builds its own FIFO queue, AVCO rolling average, or FEFO expiry-ordered stack.
Per-Warehouse Cost Layers
Every receipt, return, and transfer creates an SVL stamped with its warehouse. FIFO candidates, AVCO pools, and FEFO queues are all scoped to a single warehouse.
Core EngineNegative-Stock Prevention
OUT moves are pre-flight validated against per-warehouse open layers. A clear UserError is raised before posting — no silent negative-cost layers ever created.
Guard LayerFIFO Vacuum Engine
Automatic and manual vacuum matches negative-remaining-qty layers to subsequent positive ones and posts GL correction entries to resolve price drift.
Auto-ReconcileInter-Warehouse Transfers
IWT moves consume source warehouse layers (FIFO/AVCO) and seed fresh layers in the destination, with an automatic Dr/Cr journal entry when accounts differ.
GL AutomatedPPV Stamping on Vendor Bills
Purchase Price Variance SVLs from vendor-bill posting are resolved via a 3-step cascade: source SVL → PO receipts → last open layer for same product.
3-Step CascadeLanded Cost Distribution
Zero-qty adjustment SVLs are immediately distributed to open layers so future OUT moves use the correct post-landed-cost unit price — fully automatic.
Auto-DistributeCustomer Returns — AVCO
Customer returns in AVCO mode reinstate inventory at the exact original COGS unit cost of the OUT SVL — not the current rolling average — preserving margin accuracy.
Original CostStandard-Price Revaluation
Cost-change SVLs distribute proportionally across warehouses by on-hand qty for FIFO/FEFO. AVCO warehouses skip cross-WH distribution to prevent contamination.
IAS 2 CompliantCosting Method Change
Switching methods rebalances open layers to weighted average (IAS 2 §36 prospective), posts the GL delta entry, and logs a full audit trail on the product category.
Audit Trail▸ Costing Methods
Three Methods · One Category Setting
Configure from the Warehouse Costing tab on any product category. Different categories can use different methods simultaneously.
First In First Out
The oldest cost layers are consumed first within each warehouse's independent FIFO queue. Ideal for perishables and traceability-critical products.
▸ Vacuum on every IN move
▸ SAVEPOINT per vacuum pair
Average Cost
Rolling weighted-average cost from open layers' remaining_value ÷ remaining_qty, scoped to each warehouse. No cross-warehouse average contamination.
▸ Shortfall distribution logic
▸ Vacuum resolves negatives
First Expired First Out
Expiry-date-ordered FIFO: layers with the earliest expiry_date are consumed first. Lots with expiration dates required on all moves.
▸ NULLS LAST ordering
▸ Falls back to move_date
▸ Screenshots
Native Odoo UI — Zero Custom Views
All configuration lives inside Odoo's standard Settings and Product Category screens. No custom menus or separate apps needed.
Inventory Settings · Enable Toggle
Product Category · Warehouse Costing Tab
▸ Architecture
Warehouse Resolution — 4-Layer SQL Cascade
Every SVL creation resolves the warehouse through a deterministic, cached cascade — SQL-first for performance, ORM fallback for edge cases.
lot_stock_id
Direct SQL match on the warehouse's main stock location.
Input / Output
Match against wh_input, wh_output, wh_pack locations.
ORM Computed
Invalidate cache, read warehouse_id from stock.location.
parent_path LIKE
SQL LIKE on ancestor parent_path — longest match wins.
▸ Configuration Reference
System Parameters
| Parameter | Default | Description |
|---|---|---|
warehouse_costing.enable |
False | Master switch. Accepts: true / 1 / yes / on / y / t |
warehouse_costing.recompute_batch_size |
5000 | Batch size for scheduled recompute of SVL remaining values. |
warehouse_costing.journal_id.{company_id} |
(auto) | Per-company journal ID for vacuum and IWT correction entries. |
▸ Product Category Fields
| Field | Values | Notes |
|---|---|---|
warehouse_costing_method |
none · fifo_by_warehouse · avco_by_warehouse · fefo_by_warehouse | Stored per category. Changing triggers layer rebalancing + GL entry. |
costing_method_history |
(auto-generated) | Append-only audit log: timestamp, user, old → new method. |
▸ Technical
Stack & Dependencies
Pure Python extension — no npm packages, no external services, no schema-breaking migrations on standard Odoo tables.
▸ What's Included
Full-Stack Coverage
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module