| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 949 |
| Technical Name |
qt_stock_variant_preview |
| License | LGPL-3 |
| Website | https://odootips.com |
| Versions | 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 949 |
| Technical Name |
qt_stock_variant_preview |
| License | LGPL-3 |
| Website | https://odootips.com |
| Versions | 17.0 18.0 19.0 |
This module adds a Stock Preview tab to the product form that displays a full variant matrix with On Hand and Forecasted quantities. Organized by warehouse and location, with collapsible sections, zero-stock filtering, and Excel export.
- ✅ Variant Matrix Grid - Columns = first attribute, rows = remaining attributes
- ✅ On Hand & Forecast - Toggle forecast display alongside on-hand stock
- ✅ Warehouse Groups - Collapsible sections per warehouse with aggregate totals
- ✅ Location Breakdown - Per-location matrices within each warehouse
- ✅ Row & Column Totals - Automatic totals with grand total
- ✅ Smart Filters - Filter by warehouse, location (searchable), show/hide zeros
- ✅ Excel Export - Download stock matrix as Excel with current filters applied
- ✅ Read-Only & Safe - Only reads data, no writes, no native method overrides
- ✅ 3+ Attribute Support - Compound rows for products with 3 or more attributes
- ✅ i18n Ready - Translation-ready with .pot file included
- ✔ Community
-
✔
Enterprise
(On-premises) - ✔ Odoo.sh
- ✘ Online
📦 Dependencies
- • Inventory (stock)
💻 Technical
- • OWL Component (view widget)
- • No Python dependencies
- • Read-only, no DB writes
- • License: LGPL-3
1. Stock Preview Tab on Product Form
The Stock Preview tab appears automatically on storable products with variants. It displays a summary bar with total variants, on hand, and forecast quantities.
📷 Stock Preview tab with summary header, filters, and warehouse groups
The Stock Preview tab is automatically visible on the product form when:
✅ Track Inventory Enabled
The product must be of type Goods with is_storable (Track Inventory) checked.
✅ Has Variants
The product must have 2 or more variants configured via attributes.
The matrix displays the first attribute as columns and all remaining attributes as compound rows. For example, a product with Color (Red, Blue) and Size (S, M, L) will show Color as columns and Size as rows.
1 Attribute
Single row matrix (e.g., Color only)
2 Attributes
Standard 2D matrix (Color x Size)
3+ Attributes
Compound rows (Size • Height)
Use the filters in the toolbar to narrow down stock data:
Available Filters:
- Warehouse - Select a specific warehouse or view all warehouses
- Location - Searchable dropdown showing only locations with stock (appears when a warehouse is selected)
- Forecast - Toggle to show forecast (FC) columns alongside on-hand (OH)
- Show/Hide Zeros - Toggle visibility of rows and columns with zero stock
- Excel - Download the current view as a formatted Excel file
Each warehouse is displayed as a collapsible card. The card header shows the warehouse name with total OH and FC quantities. Click to expand and view:
Total General Matrix
Aggregated stock across all locations in the warehouse. Shown first with a "Total General" label.
Per-Location Matrices
Individual matrices for each internal location. The location path is shown in the header cell (e.g., WH/Stock/A1 - Product Name).
Click the Forecast button to enable forecast display. When active:
- Each column splits into OH (On Hand) and FC (Forecast) sub-columns
- Row totals and column totals include both OH and FC sums
- Grand total shows both aggregated values
- On-hand stock is always visible â it never hides
virtual_available field.
Click the green Excel button to download a .xlsx file with all matrices matching your current filters.
✅ What's included
- One sheet per warehouse
- Total General matrix + per-location matrices
- Formatted headers matching the UI colors
- OH + FC columns when forecast is enabled
🔍 Respects Filters
- Warehouse filter → only that warehouse sheet
- Location filter → only that location's data
- Forecast toggle → includes FC columns
Steps:
- Copy the
qt_stock_variant_previewfolder into your Odoo custom addons directory - Restart the Odoo server
- Go to Apps, remove the "Apps" filter, and search for "Stock Variant Matrix Preview"
- Click Install
- Ensure Variants are enabled: Settings → Inventory → Product Variants
- Navigate to any storable product with variants to see the Stock Preview tab
xlsxwriter is already bundled with Odoo.
_compute_quantities_dict to read stock values. No write operations, no override of native methods.
For questions, bug reports, or feature requests, please contact us:
Please log in to comment on this module