MRP MPS Fast Search
Indexed cache of the replenishment states for instant MPS filters.
The Problem
The standard Master Production Schedule computes the replenishment state of each line at query time. Every time a user applies a filter such as To Replenish, Under Replenishment or Excessive Replenishment, Odoo loads all the lines, recomputes the state on the whole set and, for each product, walks the bill of materials and queries stock moves and purchase order lines. On databases with thousands of lines this can take tens of seconds or more.
Solution
The replenishment state is precomputed and stored on each planning line:
| Filter | Meaning |
|---|---|
| To Replenish | At least one period needs replenishment |
| Under Replenishment | At least one period is below the minimum |
| Excessive Replenishment | At least one period has excessive replenishment |
Features
- Toggle in the settings — enables/disables fast search per company in Manufacturing → Settings
- Automatic scheduled action — cache refreshed every hour, switched on/off automatically with the toggle
- Manual refresh — Manufacturing → Planning → MPS: Refresh replenishment state cache
- Transparent fallback — when the flag is disabled, the native behaviour is restored
- Compatible with the MPS Demand Mode module
Configuration
- Install the module.
- Go to Manufacturing → Settings → Master Production Schedule and enable Fast Search.
- Run MPS: Refresh replenishment state cache manually the first time.
- The hourly scheduled action keeps the cache up to date automatically.
Developed by STeSI Consulting — Francesco Moccia <moccia.f@stesi.consulting>