Product matrix
Select multiple product variants in a two-dimensional interface to speed up entry on sales and purchase orders.
Product Matrix provides a UI layer for working with many variants at once instead of adding each line manually. The matrix display works best for products with at least two attributes, such as color and size.
This feature is usually consumed through Sales or Purchase extensions, where the same product template has multiple variant combinations that need fast and readable quantity entry.
What the matrix solves
Key points
• Displays variants as a two-dimensional table so users can see all combinations in one view.
• Allows fast quantity entry for many variants instead of creating separate order lines one by one.
• Applies attribute-based extra pricing where relevant.
• Keeps PDF order reports shorter and easier to read when many variants belong to the same base product.
Prerequisites for using the matrix
Key points
• The product must have at least two attribute lines.
• Each attribute should ideally have two or more values so the matrix is operationally useful.
• Attributes should create variants using Always or Dynamically.
• The matrix appears only when business modules such as sale_product_matrix or purchase_product_matrix call this interface.
Main interface terminology
| Fields | Trường dữ liệu | Description |
|---|---|---|
| Choose Product Variants | Chọn biến thể sản phẩm | Dialog title shown when the product qualifies for matrix selection. |
| Product matrix block | Khối ma trận sản phẩm | The two-dimensional grid area that displays variant combinations. |
| Variant price | Giá biến thể | Extra price associated with specific attribute values. |
| Not available | Không khả dụng | Disabled cell for a combination that does not exist or cannot be used. |
| Confirm | Xác nhận | Creates order lines for cells with quantity above zero. |
| Discard | Huỷ bỏ | Closes the dialog without writing anything to the order. |
How to open and use the matrix
Steps
1. Create a new Sales Order or Purchase Order in a module that supports Product Matrix.
2. Click Add a product and select a product with multiple variants.
3. If the product has at least two attributes, Odoo opens the Choose Product Variants dialog.
4. Enter quantities in the cells that match the required variant combinations.
5. Use Tab or Enter to move quickly between cells.
6. Click Confirm so Odoo creates order lines for every cell with a quantity greater than zero.
How to read the matrix structure
Typically, one attribute is placed on columns and another on rows. The cells in between represent each concrete variant combination, while pricing badges highlight extra price differences.
Meaning of matrix parts
| Part | Meaning | Example |
|---|---|---|
| Column header | Values of the first attribute | Red, Blue, Yellow |
| First column | Values of the second attribute | Size S, Size M, Size L |
| Quantity cell | Quantity for a specific combination | Red + Size M = 12 |
| Price badge | Extra price from an attribute value | (+$5) for a premium color |
Report display
Key points
• When printing an order, grouped variants can be displayed as a matrix instead of a long flat list.
• This makes it easier for readers to understand quantity distribution by size, color, or configuration.
• The output is cleaner for industries with many variants such as fashion, footwear, or accessories.
When to use or avoid the matrix
Usage guidance by scenario
| Scenario | Recommendation | Reason |
|---|---|---|
| You need many variants of the same product | Use it | The matrix is much faster than many separate lines |
| Only one or two variants are needed | Maybe skip it | Direct selection is often faster |
| The product has too many attribute dimensions | Use carefully | A two-dimensional matrix can become hard to understand |
| Variant combinations change based on real usage | Dynamic mode can help | You avoid generating every possible variant up front |
Best practices
Key points
• Standardize attribute naming and order so the matrix is easy for users to scan.
• Use extra prices only where price differences are genuinely needed.
• If some combinations should not be sold or do not exist, configure variants so the UI clearly shows them as unavailable.
• Always test on a sample order to verify that quantities and prices land correctly on generated order lines.