[ADD] modular_types: introduce modular types for configurable manufacturing #743
+632
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This module introduces support for modular product configurations in the manufacturing and sales flow. The core functionality includes modeling modular types, allowing their selection on products and SO lines, and dynamically generating manufacturing orders and stock moves accordingly.
Key features:
Modular Type Model: Adds a new model
product.modular.type
to define modular configurations. This model is linked to products, BoMs, and manufacturing orders to drive conditional behavior based on the selected modular types.Readonly BoM on MO: The BoM field in manufacturing orders is made readonly when a modular type is set, to ensure consistency with modular configurations and avoid accidental changes that might desynchronize the manufacturing process.
UI & Views: All relevant views have been extended to expose modular type fields, including product forms, BoMs, MOs, and SOs. The views also include proper domain filters and conditional visibility for a clean user experience.
Wizard Support: A wizard has been added to allow sales users to edit modular type values per sales order line. These values are persisted using a dedicated model to enable downstream usage.
Stock Move Quantity Calculation: The quantity of components in stock moves is now computed dynamically based on modular type values selected during the sales process. This ensures that material usage matches the product's configured modular structure.
This feature enhances manufacturing flexibility and traceability in environments where modular product design and configurability are business-critical.