Odoo 17 module that automatically updates the Sales Price of products based on the sales prices of their Bill of Materials (BoM) components.
When the sales price of any BoM component changes, this module
recalculates the Sales Price of all parent products that use it in
their BoMs.
Price changes are propagated through multi‑level BoMs so that complex
assemblies always reflect the latest component prices.
- Automatic roll‑up of Sales Price from BoM components.
- Triggered whenever the Sales Price of a product or variant changes.
- New Sales Price of a parent product equals the sum of
component_price * component_quantityfor all BoM lines. - Supports multi‑level BoMs (recursively updates all parent products).
- Works with BoMs of type Kit and Manufacture.
- No extra buttons or cron jobs required; runs transparently on price changes.
- Inherits from
product.templateandproduct.product. - Listens to
writeon price fields and searches allmrp.bom.linerecords where the product is used as a component. - For each affected
mrp.bom, the module recomputes the total Sales Price and writes it back to the parent product template. - Uses a visited‑set and context flags to avoid infinite recursion and duplicate computations.
- Download this repository or the latest tagged release.
- Copy the
product_bom_price_rollupfolder into your Odoocustom_addonsdirectory. - Restart the Odoo server.
- Activate Developer Mode in Odoo.
- Go to Apps → click Update Apps List.
- Search for MRP Auto Merge by Product and install the module.
- Ensure your finished products have BoMs defined (type Kit or Manufacture) and that each component has a Sales Price set.
- Change the Sales Price of any component product or variant from the standard Odoo Product form.
- After saving, open any parent product that uses this component in
a BoM:
- Its Sales Price will have been updated automatically to the sum of
component_price * quantityfor all BoM components.
- Its Sales Price will have been updated automatically to the sum of
- For multi‑level assemblies, repeat the check on higher‑level products; their prices are also updated transitively.
No additional configuration is required.
If needed, the module can be extended to work with cost price
(standard_price) or to apply a margin on top of the computed amount.
- Odoo 17 Community
- Odoo 17 Enterprise
Other versions of Odoo are not officially supported but may work with minor adjustments.
Issues, suggestions and pull requests are welcome.
When opening an issue, please include:
- Odoo edition and version.
- Exact module version tag (for example
v17.0.1.0.0). - Steps to reproduce the problem and expected behavior.
- Any relevant logs or stack traces.
This module is licensed under the LGPL‑3.0 (GNU Lesser General
Public License v3.0).
See the LICENSE file in this repository for the full license text.