odoo/tutorials#1321
Created by Soham Yashwant Patil (sopat)
Blocked
- Merge method
- Review
-
CI
- ci/style: (runtime 5s)
- ci/tutorial: (runtime 161s)
- label
- odoo-dev:19.0-modular-type-sopat
- head
- 781ba05c8f82a6a94fae395dcd677208f7c0a292
| odoo/tutorials | |
|---|---|
| 19.0 | #1321 missing r+ |
| master |
[ADD] modular_type: add modular type multiplication on MO component lines
Introduce a custom module that adds modular type multiplication
factors to Manufacturing Order component lines via BOM and Sales Order.
WHY this change is being done:
Currently there is no way to scale MO component quantities based on
customer input at the Sales Order level. For modular products, the
quantity of each component depends on how many units of each modular
type the customer orders — this cannot be handled by standard Odoo
BOM configuration alone.
Technical decisions taken:
-
Added new model
modular.typeas a configurable master list
of types that can be created by the user and assigned to
products via a m2m field on product.template. -
Added
modular_type_idm2o field onmrp.bom.lineto tag
each component with its corresponding modular type, defining
which multiplier applies to that component. -
Added
sale.order.line.modular.valuemodel to store the
multiplication values per modular type per SO line, set by
the user via a wizard popup on the Sales Order. -
Added wizard
sale.line.modular.value.wizardwith a flask
button on the SO line (visible only when product has modular
types) to let users set values for each type before confirming. -
Overrode SO confirm flow to apply modular values to MO
component quantities after MO creation.
Formula: MO component qty = BOM qty x modular type value.
Task ID- 6259556