Vendor Lead Time: Measured from Receipts, Median, P80 and Deviation
by Aerya IT Solutions https://aerya.net$ 53.69
Odoo 17, 18, 19 and 20, Community and Enterprise · Developed in the European Union by Aerya IT Solutions
Vendor Lead Time: Measured from Receipts, Median, P80 and Deviation
How long does each vendor really take? The module measures it from your purchase history and shows it on the vendor pricelists, so replenishment can plan with facts instead of the typed delay.
Median, P80 and deviation per vendor and product
Source always shown: measured or configured
One click writes it to Delivery Lead Time
The screenshots use a fictitious company, invented customers and products.
Runs on Odoo.sh and on-premise, not on Odoo Online (SaaS), where Odoo does not allow modules with Python code. Please buy the version that matches your database.
in Odoo 18, 4 of them on the pure statistics
no warnings
Community and Enterprise
The delay on the vendor pricelist is a guess that nobody checks
Every vendor line in Odoo carries a Delivery Lead Time: the number of days the vendor needs between your order and the goods. Odoo's replenishment uses it to decide when to order. Someone typed that number once, usually from what the vendor promised. A year later the vendor takes nine days instead of five, or three instead of seven, and nobody noticed. The result is stockouts when the real delay is longer, and money tied up in stock when it is shorter.
Your purchase history already contains the truth: the date each order was confirmed and the dates its goods were received. Odoo does not turn that into a lead time for you.
What it does
The module measures the real lead time of each vendor from confirmed purchase orders and their receipts. For every vendor line it shows a measured lead time, the median, the deviation and how many orders it is based on, and it labels where the figure comes from. When you trust the figures, one button writes them to Delivery Lead Time so that replenishment plans with facts. Nothing changes until you do that.
How it works, step by step
- Install. Install the module on a database with Purchase and Inventory. Past receipts count at once, there is no import.
- Set the rules. Open Purchase › Configuration › Settings, block Measured Vendor Lead Time. Choose the percentile (1 to 99, 80 by default) and the minimum number of observations. These settings are per company.
- Read the figures. Open a product's Purchase tab or the vendor pricelist. Each line shows Measured Lead Time, Lead Time Source, the number of observations, the median and the deviation. In the lists these columns are optional and hidden by default.
- Compare. Put the measured figure next to the Delivery Lead Time you typed. The source tells you whether it was measured on the product, measured on the vendor or only configured.
- Write them. When you trust them, press Write measured lead times to Delivery Lead Time. The values are rounded up to whole days. You can also switch on the weekly scheduled action, which is inactive by default, to do the same every week.
How a lead time is measured
- One observation is one received purchase order line: the days from the confirmation of the order to its last receipt. Returns are excluded.
- Only orders of the window of Odoo's on-time delivery rate count, 365 days unless you changed the system parameter
purchase_stock.on_time_delivery_days. - The measured lead time is a percentile of the observations, by linear interpolation between the closest ranks (definition 7 of Hyndman and Fan, 1996). With P80, eight orders in ten arrive within that number of days.
- The deviation is the sample standard deviation, in days. It is the input a safety stock needs to cover late deliveries.
- The most specific history with enough observations wins: the vendor and the product, then the vendor over all its products, otherwise the configured lead time. The source is always shown.
- Orders placed with any contact of the vendor count, archived contacts included.
Measured, not typed
One observation per received purchase line: days from the order confirmation to its last receipt, returns excluded, over the window of Odoo's on-time delivery rate (365 days by default).
Percentile by linear interpolation (Hyndman and Fan, definition 7), median and sample standard deviation.

The right level
Vendor and product first, then the vendor over all its products, else the configured lead time, always labelled.

Plan with it
Set the percentile and the minimum observations per company. One button (or a weekly scheduled action) writes the measured lead times to Delivery Lead Time, rounded up to whole days.

Screenshots of Odoo 17 Enterprise.
Settings and options
| Percentile | From 1 to 99, per company. Higher means a more cautious lead time. |
| Minimum observations | The number of received lines needed before a history is used. At least 1, per company. |
| Write measured lead times | A button in the Purchase settings. It writes the measured values to Delivery Lead Time, rounded up to whole days. |
| Weekly scheduled action | Does the same every week. It is inactive by default. |
| Multi-company | Vendor lines shared by all companies are measured over the orders of every company, with the settings of the current company. |
What it does not do
- A percentile outside 1 to 99 and fewer than one observation are refused in the settings.
- It does not change any lead time until you press the button or switch on the scheduled action.
- It measures purchase orders confirmed in Odoo and received in Odoo. Orders never confirmed, lead times of manufacturing and dropshipping are not covered.
- It does not compute a safety stock. It gives you the deviation to use for one.
- Past orders are not changed: the module only reads them.
Requirements
- Odoo 17, 18, 19 or 20, Community or Enterprise.
- Purchase and Inventory (
purchase_stock). - A host that allows modules with Python code: Odoo.sh or your own server.
- English, Spanish and Romanian translations.
Frequently asked questions
How many orders do I need before a figure is shown?
As many as the minimum number of observations you set. Below it, the line falls back to the vendor level and then to the configured lead time, and says so.
Which percentile should I choose?
P80 means that eight deliveries in ten arrived within the figure. Use a higher one for critical items, a lower one for items that are easy to expedite.
Does it change my replenishment by itself?
No, not until you write the values to Delivery Lead Time. Then Odoo's own replenishment uses them.
What about a vendor with several contacts?
Orders placed with any contact of the vendor count together.
What happens if I uninstall it?
The measured columns go away. The Delivery Lead Time values you wrote stay as they are.
Explore our other apps
More modules by Aerya IT Solutions for Odoo 18, built to work together.
Questions or a custom quote?
Write to info@aerya.ro for questions about the module, its installation or custom development.
Developed in the European Union by Aerya IT Solutions, Odoo implementation and development. aerya.net
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Purchase (purchase)
• Invoicing (account) • Discuss (mail) • Inventory (stock) |
| Lines of code | 311 |
| Technical Name |
aerya_purchase_lead_time |
| License | OPL-1 |
| Website | https://aerya.net |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module