odoo/tutorials#1321

Created by Soham Yashwant Patil (sopat)

Blocked

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:

  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