lead_days_widget
The lead time breakdown on a reordering rule: supplier delay, purchase security, warehouse handling, all added up. It is a server-computed JSON payload rendered by a five line widget.
August 27, 2026Updated September 7, 20265 min read
| Technical name | lead_days_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, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. The payload has to be computed server side |
| Alternatives | replenishment_graph_widget, popover_widget, html, forecast_widget |
What the lead days panel does
What this means for your team
Working examples
Five lines on a very thin base
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The Lead Days part of the file is unchanged on the development branch. |
| Odoo 19.0 | Verified | Verified against the shipped source. |
| Odoo 18.0 | Verified | Identical behavior. |
| Odoo 17.0 | Verified | Identical behavior. This is where the descriptor registration was introduced. |
| Odoo 16.0 | Verified | Same behavior, with the component class registered directly. |
Upgrade note. Nothing to do. The widget has existed since Odoo 16 and the only change is the registration style introduced in Odoo 17. What did change around it is its sibling: the replenishment history widget in Odoo 16 through 18 was replaced by a graph widget in Odoo 19.
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 base parses it without a guard. Make sure the server computes the payload before the view renders the field. |
| The panel is empty | The payload parsed but contains none of the keys the template reads. Check the server-side computation; the widget imposes no keys of its own. |
| Options are ignored | The descriptor has no extractor, so nothing in the options dictionary is read. Nothing to configure here. |
| The widget will not attach to my field | It declares a single supported type. Store the payload in a character field, as core does. |
| Missing widget error | The inventory module is not installed in that database. Install Inventory. |
Lead days panel vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
lead_days_widget | Explaining a computed lead time as a breakdown of its parts | A five line widget over a shared JSON base, with all the content decided server side |
| replenishment_graph_widget | The stock curve in the same dialog | Built on the same base, renders a chart instead of a panel |
popover_widget | A JSON-driven note behind an icon | Configurable icon, color and template from the payload itself |
| html | A breakdown computed as markup | No JavaScript at all, at the cost of client-side structure |
| forecast_widget | Whether a demand will be met | A verdict rather than an explanation |
Frequently asked questions
What does the lead days panel show?+
Can I configure what it shows?+
Why does it error on an empty field?+
Does the panel follow a recomputed value?+
Which versions have it?+
Reordering rules your buyers actually trust
Lead times, security days and routes decide when Odoo orders, and a rule nobody understands gets overridden by hand. We configure and explain replenishment on Odoo 16 through 19.
Book a free consultation