odoo/tutorials#1271
Created by Ayush Khubchandani (aykhu)
Blocked
- Merge method
- Review
-
CI
- ci/style: (runtime 4s)
- ci/tutorial: (runtime 169s)
- label
- odoo-dev:19.0-modular-types-aykhu
- head
- 977abadeb83c0bca7123d3bab3616937414b0a06
| odoo/tutorials | |
|---|---|
| 19.0 | #1271 missing r+ |
| master |
[ADD] sale_mrp_modular_type: add modular types to scale BOM quantities from sales order
In some manufacturing scenarios, the quantity of components depends on values defined at the time of sale (e.g., number of sections, length, area). However, BOMs in Odoo are static, which makes it difficult to handle such cases cleanly.
Today, users either duplicate BOMs for each variation or manually adjust quantities after order confirmation. Both approaches are error-prone and hard to maintain.
This PR introduces modular types to address this limitation in a structured way.
Key Changes
- Introduce a modular type model (e.g., sections, meters, etc.)
- Allow configuring modular types on products
- Link BOM lines to a modular type, making their quantity act as a base value
- Add support to input modular values on the sales order line
- Compute final component quantities during manufacturing order creation
Result
- Flexible manufacturing based on sales input
- No BOM duplication
- Reduced manual work and fewer errors
- Better traceability between sales and production.