[ADD] modular_type: add modular type multiplication on MO component lines#1321
Draft
sopat-odoo wants to merge 1 commit into
Draft
[ADD] modular_type: add modular type multiplication on MO component lines#1321sopat-odoo wants to merge 1 commit into
sopat-odoo wants to merge 1 commit into
Conversation
…ines - Add m2m field on - Add m2o field on - Add model to store type values per SO line - Add wizard to set modular values on SO line - Add button on SO line to open wizard (visible when product has modular types) - Override SO confirm to apply modular values to MO component quantities - MO component qty = BOM qty x modular type value set on SO line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

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 listof 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 tageach component with its corresponding modular type, defining
which multiplier applies to that component.
Added
sale.order.line.modular.valuemodel to store themultiplication 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 flaskbutton 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