Skip to content

[ADD] sale_mrp_modular_type: add modular types to scale BOM quantities from sales order#1271

Draft
aykhu-odoo wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-modular-types-aykhu
Draft

[ADD] sale_mrp_modular_type: add modular types to scale BOM quantities from sales order#1271
aykhu-odoo wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-modular-types-aykhu

Conversation

@aykhu-odoo
Copy link
Copy Markdown

@aykhu-odoo aykhu-odoo commented May 18, 2026

In some manufacturing scenarios, the quantity of components depends on values defined at the time of sale (e.g., number of sections, length, area). However, BOMs in Odoo are static, which makes it difficult to handle such cases cleanly.

Today, users either duplicate BOMs for each variation or manually adjust quantities after order confirmation. Both approaches are error-prone and hard to maintain.

This PR introduces modular types to address this limitation in a structured way.

Key Changes

  • Introduce a modular type model (e.g., sections, meters, etc.)
  • Allow configuring modular types on products
  • Link BOM lines to a modular type, making their quantity act as a base value
  • Add support to input modular values on the sales order line
  • Compute final component quantities during manufacturing order creation

Result

  • Flexible manufacturing based on sales input
  • No BOM duplication
  • Reduced manual work and fewer errors
  • Better traceability between sales and production.

@robodoo
Copy link
Copy Markdown

robodoo commented May 18, 2026

Pull request status dashboard

@aykhu-odoo aykhu-odoo changed the title [ADD] sale_mrp: add modular types to scale BOM quantities from sales order [ADD] sale_mrp_modular_type: add modular types to scale BOM quantities from sales order May 18, 2026
@aykhu-odoo aykhu-odoo force-pushed the 19.0-modular-types-aykhu branch from 925fa58 to 6d0a190 Compare May 18, 2026 09:36
…s from sales order

In some manufacturing cases, the quantity of components depends on
values decided at the time of sale (like number of sections, length,
area, etc.). Currently, BOMs are fixed, so handling this kind of
requirement means either duplicating BOMs or manually adjusting
quantities, which is not practical and leads to mistakes.

This change introduces *modular types* to handle this more cleanly.

Products can be configured with modular types (like sections, meters…),
and BOM lines can be linked to those types. Instead of being fixed,
those BOM quantities now act like base values.

When such a product is added to a sales order, the user can enter values
for each modular type. These values are then used when creating the
manufacturing order, where component quantities are computed as a function of:
    - the base BOM quantity
    - the modular type multiplier defined on the sales order

The goal is to avoid duplicating BOMs and remove the need for manual
adjustments, while still keeping the flexibility to handle different
configurations per order.

This keeps the flow simple for users and makes sure the manufacturing
data always matches what was defined during the sale.

A dedicated modular type model is introduced and linked to products
(m2m) to define available dimensions, while BOM lines reference a single
modular type (m2o). This separation allows reusable configuration on the
product side while keeping BOM logic simple and explicit.
The computation is applied at MO generation time.
The computation is applied at MO generation time.
@aykhu-odoo aykhu-odoo force-pushed the 19.0-modular-types-aykhu branch from 6d0a190 to e8ee34a Compare May 19, 2026 05:05
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