mrp_mps_bottom_up/README.md
2026-03-02 13:10:19 +07:00

31 lines
2.0 KiB
Markdown

# MPB Bottom-Up Replenishment (Two-Way MPS)
## Overview
This module (`mrp_mps_bottom_up`) enhances the standard Odoo 19 Master Production Schedule (MPS) by introducing a "two-way" propagation of manual replenishment quantity changes.
In standard Odoo MPS, modifying the replenishment quantity of a top-level component (`FG1`) creates downward indirect demand for its sub-components (`FG` or `WIP`), but modifying a sub-component (`FG`) has no effect on its parent (`FG1`).
This module intercepts manual edits to the `replenish_qty` cell and automatically:
1. **Traces Up (Bottom-Up):** Calculates the equivalent base quantity required for any parent products and seamlessly updates their replenishment quantities in the same period without triggering infinite loops.
2. **Drills Down (Top-Down):** Calculates the equivalent quantity required for child components and explicitly pushes this demand down.
It fully supports sub-component scaling based on correct BOM ratios.
It includes built-in compatibility with custom packaging quantities (e.g. from the `mrp_packaging_qty` module), accurately multiplying or dividing base units by packaging multipliers during the Drill Down operation.
## Installation
Add the module to your custom addons directory and install it via the regular Odoo `Apps` menu. The module implicitly depends on the core `mrp_mps` enterprise module.
## Usage
1. Open the **Master Production Schedule** view.
2. Ensure you have product hierarchies defined with BOMs (e.g. `Product A` requires 2x `Product B`).
3. Add both `Product A` and `Product B` to your MPS view.
4. If you artificially increase the Replenishment for the child `Product B`, you will see `Product A` automatically adjust to reflect the scaled parent demand.
5. If you increase the Replenishment for a middle component, you will observe the quantity propagate up to parents AND down to children simultaneously.
## Dependencies
* `mrp_mps` (Core Odoo Enterprise module)
* Compatible with `mrp_packaging_qty` (Custom Module)
## License
Licensed under LGPL-3.0.