Skip to content

Conversation

@bosd
Copy link
Contributor

@bosd bosd commented Jun 16, 2025

Business Need In many manufacturing workflows, products are sold to
customers via Sales Orders and subsequently manufactured through
Manufacturing Orders (MOs). Often, these manufactured products require
various components that are consumed during production and tracked via
Bills of Materials (BoMs).

However, in certain business scenarios, it's necessary not only to
manufacture a finished product but also to invoice the customer for the
individual components used in production, especially when the components
themselves are valuable, consumable, or customer-specific.

Odoo, by default, does not automatically add consumed components to the
related Sale Order. This leads to:

  • Manual effort in identifying and adding consumed items for invoicing.
  • Risk of underbilling customers for actual material usage.
  • Inconsistencies between manufacturing records and customer billing.

Module Purpose This module addresses the above gap by automatically
adding all sale_ok=True components that were actually consumed in a
Manufacturing Order to the linked Sale Order. It ensures:

  • Full traceability and billing accuracy of component usage.
  • Avoidance of double entry by manufacturing and sales teams.

Compatibility with multiple MOs linked to the same SO (incrementing
quantities when the same component is used more than once).

Real word use case: This module is very usefull in a subcontractee
scenario. E.g. the customer is the owner of the component and
endproduct. But the subcontractee is providing operations over the
product and adding components. These components need to be invoiced
separately to the customer. In this scenario, the raw material supplied
by the customer is not saleble. (He already owns it and gives it in
consinee to the subcontractee.) The added components should be set up as
salebale products.

With this module installed and the scenario where consumption of the
components are added to a mo. Upon "mark done" of the MO the consumed
components are added to the sale order. Making them invoicable to the
customer.

@rousseldenis rousseldenis added this to the 18.0 milestone Jun 16, 2025
Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bosd Could you check tests ?

@rousseldenis
Copy link
Contributor

A question about that:

  • Risk of underbilling customers for actual material usage.

If you bill the finished product, where is the risk of underbilling ???

@bosd bosd force-pushed the 18.0-add-sale_order_add_consumed_components branch from e1b7b1d to e1d79b0 Compare June 16, 2025 13:37
@bosd
Copy link
Contributor Author

bosd commented Jun 16, 2025

If you bill the finished product, where is the risk of underbilling ???

In our use case, We are a contract manufacturer.
The customer provide raw material which we process.
The raw material will be processed into multiple different variants. (By-products, but that is another module )

The end products will be packaged. The packages that will be used are defined as Components on the bom.
After closing of the MO, we need to charge the customer for the "packagings" that we added over the end product.
This module will add those "Packagings" to the sale order. (Which originally triggered this mo).

Without this module. The client will not be charged for the added "Packagings".

Additional context: The "End products" are stored at the contract manufactureres facility. We want to trigger the Invoicing before we deliver the end products to the customer. As they can be held in storage for a long time.

@bosd bosd force-pushed the 18.0-add-sale_order_add_consumed_components branch 4 times, most recently from 4a9111b to 3010738 Compare June 16, 2025 17:37
@bosd bosd force-pushed the 18.0-add-sale_order_add_consumed_components branch from 3010738 to 910938a Compare June 16, 2025 18:02
@bosd
Copy link
Contributor Author

bosd commented Jun 16, 2025

Could you check tests ?

Done. Tests of this module are ok now.
It's still red, but that is from other modules.
Should these be added as rebel modules??

The 18 branch needs fixing see: #3667

Use the price of the applicable pricelist instead of price on the product form.
@bosd
Copy link
Contributor Author

bosd commented Oct 15, 2025

@bosd Could you check tests ?

🟢 now!!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants