Skip to content

[ADD] modular_type: add modular type multiplication on MO component lines#1321

Draft
sopat-odoo wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-modular-type-sopat
Draft

[ADD] modular_type: add modular type multiplication on MO component lines#1321
sopat-odoo wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-modular-type-sopat

Conversation

@sopat-odoo
Copy link
Copy Markdown

@sopat-odoo sopat-odoo commented Jun 3, 2026

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:

  1. Added new model modular.type as a configurable master list
    of types that can be created by the user and assigned to
    products via a m2m field on product.template.

  2. Added modular_type_id m2o field on mrp.bom.line to tag
    each component with its corresponding modular type, defining
    which multiplier applies to that component.

  3. Added sale.order.line.modular.value model to store the
    multiplication values per modular type per SO line, set by
    the user via a wizard popup on the Sales Order.

  4. Added wizard sale.line.modular.value.wizard with a flask
    button on the SO line (visible only when product has modular
    types) to let users set values for each type before confirming.

  5. 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

…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
@robodoo
Copy link
Copy Markdown

robodoo commented Jun 3, 2026

Pull request status dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants