replenishment_graph_widget
The saw-tooth stock curve on a reordering rule, drawn against its minimum and maximum lines. New in Odoo 19, and it replaced a widget that showed history instead of a forecast.
| Technical name | replenishment_graph_widget |
|---|---|
| Field types | char |
| Views | form |
| Module | stock, the Inventory app |
| Used in core | 1 occurrence, the replenishment information dialog in stock |
| Versions | Odoo 20.0, Odoo 19.0 |
| No-code setup | No. The chart payload has to be computed server side |
| Alternatives | lead_days_widget, dashboard_graph, picking_type_dashboard_graph, forecast_widget |
What the replenishment graph does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
x_axis_vals | key in the JSON payload | The category labels for the x axis. Its last value also decides where the curve starts being drawn dashed.(since Odoo 19.0) |
max_line_vals | key in the JSON payload | Points for the horizontal maximum line.(since Odoo 19.0) |
min_line_vals | key in the JSON payload | Points for the horizontal minimum line.(since Odoo 19.0) |
curve_line_vals | key in the JSON payload | Points for the stock curve itself, dashed beyond the last recorded x value.(since Odoo 19.0) |
product_min_qty | key in the JSON payload | Injected into the y axis tick list and printed beside the chart. Also sets the lower axis bound, padded ten percent.(since Odoo 19.0) |
product_max_qty | key in the JSON payload | Injected into the y axis tick list and printed beside the chart. Also sets the upper axis bound, padded ten percent.(since Odoo 19.0) |
qty_on_hand | key in the JSON payload | Printed beside the chart. Not used by the chart itself.(since Odoo 19.0) |
daily_demand | key in the JSON payload | Printed beside the chart as the consumption rate the curve assumes.(since Odoo 19.0) |
average_stock | key in the JSON payload | Printed beside the chart. The average the current parameters imply.(since Odoo 19.0) |
ordering_period | key in the JSON payload | Printed beside the chart. How often the rule would order.(since Odoo 19.0) |
lead_time | key in the JSON payload | Printed beside the chart. The delay before a replenishment arrives.(since Odoo 19.0) |
product_uom_name | key in the JSON payload | Printed with the quantities when the user belongs to the unit of measure group, which the widget resolves at startup.(since Odoo 19.0) |
The payload is the contract. The chart reads its x axis values and three line datasets by name, and the summary getters read six more keys. A missing key produces an empty line or a blank figure rather than an error, but a missing or malformed payload raises, because the shared base parses without a guard.
Working examples
A forced y axis and a geometric dash rule
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | Partial / changed | Not released. The chart configuration is unchanged; the library loading moves to a shared chart hook. |
| Odoo 19.0 | Verified | First version. Replaces the replenishment history widget used in the same dialog. |
| Odoo 18.0 | Not available | Widget does not exist. The dialog used a replenishment history widget instead. |
| Odoo 17.0 | Not available | Widget does not exist. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. This widget is new in Odoo 19 and it replaces the replenishment history widget used in Odoo 16 through 18. The core dialog was updated with it, so a standard database needs nothing; a customized replenishment dialog referring to the old widget name should be updated, because an unknown widget name silently falls back to the field's type.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| An error about parsing JSON | The field is empty or malformed, and the shared base parses without a guard. Make sure the server computes the payload before the dialog renders. |
| The chart is blank | The payload parsed but the three dataset keys are missing or empty. Check the server-side computation; the widget reads them by name. |
| Nothing is dashed | No segment starts at the last x axis value, so the dash callback never applies. The boundary is controlled by how the server orders the axis values. |
| The y axis has no useful labels | Only the minimum and maximum are labelled; every other tick prints blank by design. Expected. The precise figures are printed beside the chart. |
| No tooltips on hover | Tooltips and the legend are both disabled in the configuration. Expected. The chart is an illustration, not an interactive report. |
| The old history panel disappeared after upgrading | Odoo 19 replaced the replenishment history widget with this one. Update any customized dialog to the new widget name. |
Replenishment graph vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
replenishment_graph_widget | Showing what a reordering rule's minimum and maximum actually produce | A scatter chart with forced min and max ticks and a projection dashed from the last recorded point |
lead_days_widget | The lead time breakdown in the same dialog | A textual panel on the same shared base |
dashboard_graph | Small charts on kanban cards | A much simpler payload and only line or bar |
| picking_type_dashboard_graph | Operation type dashboards | Its own bucket coloring and click targets |
| forecast_widget | Whether a specific demand will be met | A verdict badge rather than a curve |
Frequently asked questions
What does the replenishment curve show?+
Where does the dashing start?+
Why does the y axis only label two values?+
Can I configure the chart?+
What happened to the replenishment history widget?+
Stock parameters set from evidence, not habit
Minimums, maximums and lead times decide how much cash sits on your shelves. We tune Odoo replenishment against your real demand data, on versions 16 through 19.
Book a free consultation