Skip to content

Commit 41b30c9

Browse files
committed
[ADD] Inventory: Just In Time logic
closes #14680 Signed-off-by: Jessica Rogers (jero) <[email protected]>
1 parent ea076cd commit 41b30c9

File tree

9 files changed

+108
-105
lines changed

9 files changed

+108
-105
lines changed

content/applications/inventory_and_mrp/inventory/warehouses_storage/replenishment.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ manufacturing order (MO), with the best choice depending on the business process
2727

2828
Automatically suggest or generate POs or MOs when stock falls below a minimum level.
2929

30+
.. card:: Just in time logic
31+
:target: replenishment/just_in_time
32+
:tag: Recommended
33+
:large:
34+
35+
Avoid overstocking by placing order precisely to meet deadlines.
36+
3037
.. card:: MTO
3138
:target: replenishment/mto
3239
:tag: Beginner-friendly
@@ -67,8 +74,8 @@ Key points include:
6774
- :ref:`Manual reordering rules <inventory/warehouses_storage/manual-rr>`: Generate suggestions in
6875
the replenishment report for user review, allowing adjustments and batch orders while meeting
6976
deadlines.
70-
- :ref:`Just-in-time logic <inventory/warehouses_storage/just-in-time>`: A strategy to replenish
71-
only what is needed to prevent overstocking.
77+
- :doc:`Just in time logic <replenishment/just_in_time>`: A strategy to replenish only what is
78+
needed to prevent overstocking.
7279

7380
.. seealso::
7481
- :doc:`replenishment/reordering_rules`
@@ -119,6 +126,7 @@ disrupts its manual replenishment method.
119126

120127
replenishment/mto
121128
replenishment/reordering_rules
129+
replenishment/just_in_time
122130
replenishment/report
123131
replenishment/lead_times
124132
replenishment/resupply_warehouses
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
==================
2+
Just in time logic
3+
==================
4+
5+
.. |SO| replace:: :abbr:`SO (Sales Order)`
6+
.. |SOs| replace:: :abbr:`SOs (Sales Orders)`
7+
8+
*Just-in-time logic* in Odoo minimizes storage costs by placing orders precisely to meet deadlines.
9+
This is achieved using the :ref:`forecasted date <inventory/warehouses_storage/forecasted-date>`,
10+
which determines when replenishment is necessary to avoid overstocking. For example, for a product
11+
with a 5-day total lead time and a sales order delivery date in 10 days, Odoo waits 5 days to place
12+
the order, ensuring it arrives just in time for delivery.
13+
14+
The forecasted date is the **earliest possible date** to receive a product if the replenishment
15+
process starts immediately. It is calculated by summing the lead times linked to the replenishment
16+
process, such as :ref:`vendor lead times <inventory/warehouses_storage/purchase-lt>` and
17+
:ref:`purchasing delays <inventory/warehouses_storage/purchase-security-lt>` for purchases, or
18+
:ref:`manufacturing lead times <inventory/warehouses_storage/manuf-lt>` for production. This works
19+
with both automatic and manual reordering rules.
20+
21+
.. tip::
22+
If utilizing just-in-time logic feels risky, consider adding buffer time or :doc:`adjusting lead
23+
times <lead_times>` for more flexibility. While lead times and just-in-time logic provide
24+
additional control, reordering rules work perfectly fine without them. Keeping delivery dates on
25+
|SOs| as their *creation date* ensures purchases are immediately triggered when needed.
26+
27+
.. _inventory/warehouses_storage/forecasted-date:
28+
29+
Forecasted date and to order quantity
30+
=====================================
31+
32+
The *forecasted date* is the earliest receipt date for a product, if it is ordered right now. It is
33+
calculated by summing the lead times linked to the product's replenishment process. The total of
34+
these lead times, added to the current date, determines when Odoo checks for demanded stock.
35+
36+
To view the forecasted date go to :menuselection:`Inventory app --> Operations --> Replenishment` to
37+
access the :doc:`replenishment report <report>`, then click the :icon:`fa-info-circle`
38+
:guilabel:`(info)` icon for the desired reordering rule. The :guilabel:`Replenishment Information`
39+
pop-up window displays the :guilabel:`Forecasted Date` and various lead times.
40+
41+
The just-in-time logic ensures replenishment occurs only when required to meet forecasted demand,
42+
reducing the risk of overstocking.
43+
44+
.. note::
45+
Just-in-time logic determines the exact timing of replenishment. If you want to extend this logic
46+
to also consider near-future demand beyond the forecast date, see :ref:`Visibility Days
47+
<inventory/warehouses_storage/visibility-days>`
48+
49+
If the forecasted quantity falls below the minimum on the forecasted date, replenishment is
50+
triggered immediately to prevent shortages. If the quantity falls below the minimum after the
51+
forecasted date, replenishment is deferred.
52+
53+
The :guilabel:`To Order` quantity is defined as the total demand on the forecasted date.
54+
55+
By scheduling purchase orders according to combined lead times, Odoo minimizes inventory while
56+
ensuring that future demand is met on time.
57+
58+
.. example::
59+
A manual reordering rule is set up with no minimum or maximum quantities.
60+
61+
- Vendor lead time is 4 days, and the days to purchase is 2 days.
62+
- Today's date is October 2.
63+
- These add up to 6 days, making the forecasted date, October 8.
64+
65+
A confirmed |SO| for 5 units has a delivery date of October 8th (6 days from today). This demand
66+
will appear on the replenishment report today, in the :guilabel:`To Order` field.
67+
68+
However, if the delivery date were later than October 8th, it would not yet appear on the report.
69+
Odoo only displays quantities to replenish when they fall within the forecasted date window,
70+
ensuring orders are placed precisely when needed.
71+
72+
.. image:: just_in_time/replenishment-info.png
73+
:alt: Show forecasted date in Odoo.
74+
75+
.. important::
76+
|SOs| scheduled after the :guilabel:`Forecasted Date` are not included in the :guilabel:`Forecast`
77+
quantities of a reordering rule. However, they do appear in the forecasted report, since it
78+
reflects the long-term forecasted quantity. To access the forecasted report, click
79+
:icon:`fa-area-chart` :guilabel:`(area chart)` icon on the replenishment report.
80+
81+
.. seealso::
82+
- :doc:`Reordering Rules <reordering_rules>`
83+
- :doc:`Replenishment Report <report>`
84+
- :doc:`Lead Times <lead_times>`
13.2 KB
Loading

content/applications/inventory_and_mrp/inventory/warehouses_storage/replenishment/lead_times.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ confirm a request for quotation (RFQ) and when to expect the goods.
168168
- Arrival date of the products. Calculated by *Order Deadline* + *Vendor Lead Time*
169169

170170
In addition, Odoo has global security lead times, which are buffers that widen the
171-
:ref:`just-in-time <inventory/warehouses_storage/just-in-time>` (JIT) forecast window. The security
172-
lead times affect **only** replenishment methods that use :doc:`pull rules
171+
:doc:`just-in-time <just_in_time>` (JIT) forecast window. The security lead times affect **only**
172+
replenishment methods that use :doc:`pull rules
173173
<../../shipping_receiving/daily_operations/use_routes>`—for example :doc:`reordering rules
174174
<reordering_rules>` or :doc:`make to order (MTO) <mto>`. They do not change the interval between
175175
*Order Deadline* and *Expected Arrival*.

content/applications/inventory_and_mrp/inventory/warehouses_storage/replenishment/reordering_rules.rst

Lines changed: 10 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ To set up reordering rules for the first time, refer to:
3535

3636
To understand and optimize replenishment using advanced features, see:
3737

38-
- :ref:`Just-in-time logic <inventory/warehouses_storage/just-in-time>`
38+
- :doc:`Just in time logic <just_in_time>`
3939
- :ref:`Visibility days <inventory/warehouses_storage/visibility-days>`
4040
- :ref:`Horizon days <inventory/warehouses_storage/horizon-days>`
4141

@@ -127,8 +127,8 @@ rule line item:
127127

128128
.. note::
129129
To learn how the :guilabel:`On Hand`, :guilabel:`Forecast`, and :guilabel:`To Order` fields are
130-
calculated using on-hand quantities and future demand, see the :ref:`Just-in-time logic
131-
<inventory/warehouses_storage/just-in-time>` section.
130+
calculated using on-hand quantities and future demand, see :doc:`Just in time logic
131+
<just_in_time>`
132132

133133
For advanced usage, learn about the following reordering rule fields:
134134

@@ -386,102 +386,8 @@ advanced configurations of reordering rules. Consider the following:
386386
five products' reordering rules. This ensures future demands for these products are
387387
managed separately and assigned to different |RFQs| (the usual behavior).
388388
389-
.. _inventory/warehouses_storage/just-in-time:
390-
391-
Just-in-time logic
392-
==================
393-
394-
*Just-in-time logic* in Odoo minimizes storage costs by placing orders precisely to meet deadlines.
395-
This is achieved using the :ref:`forecasted date <inventory/warehouses_storage/forecasted-date>`,
396-
which determines when replenishment is necessary to avoid overstocking.
397-
398-
The forecasted date is the **earliest possible date** to receive a product if the replenishment
399-
process starts immediately. It is calculated by summing the lead times linked to the replenishment
400-
process, such as :ref:`vendor lead times <inventory/warehouses_storage/purchase-lt>` and
401-
:ref:`purchasing delays <inventory/warehouses_storage/purchase-security-lt>` for purchases, or
402-
:ref:`manufacturing lead times <inventory/warehouses_storage/manuf-lt>` for production. Both
403-
automatic and manual reordering rules work this way.
404-
405-
.. example::
406-
For a product with a 5-day total lead time and a sales order delivery date in 10 days, Odoo waits
407-
5 days to place the order, ensuring it arrives just in time for delivery.
408-
409-
Important considerations:
410-
411-
- **If this feels risky**, consider adding buffer time or :doc:`adjusting lead times <lead_times>`
412-
for more flexibility.
413-
- While lead times and just-in-time logic provide additional control, **reordering rules work
414-
perfectly fine without them**. Keeping delivery dates on sales orders as their *creation date*
415-
ensures purchases are immediately triggered when needed
416-
417-
.. _inventory/warehouses_storage/forecasted-date:
418-
419-
Forecasted date and To Order quantity
420-
-------------------------------------
421-
422-
The *forecasted date* is the earliest receipt date for a product, if it is ordered right now. It is
423-
calculated by summing the lead times linked to the product's replenishment process. The total of
424-
these lead times, added to the current date, determines when Odoo checks for demanded stock.
425-
426-
To view the forecasted date go to the replenishment report and click the :icon:`fa-info-circle`
427-
:guilabel:`(info)` icon for the desired reordering rule. The :guilabel:`Replenishment Information`
428-
pop-up window displays the :guilabel:`Forecasted Date` and various lead times.
429-
430-
.. example::
431-
A manual reordering rule is set up with no minimum or maximum quantities.
432-
433-
- Vendor lead time is 4 days, the purchase security lead time is 1 day, and the days to purchase
434-
is 2 days.
435-
- Today's date is November 26.
436-
- These add up to 7 days, making the forecasted date, December 3rd.
437-
438-
A confirmed |SO| for 5 units has a delivery date of December 3rd (7 days from today). This demand
439-
will appear on the replenishment report today, in the **To Order** field.
440-
441-
However, if the delivery date were later than December 3rd, it would not yet appear on the
442-
report. Odoo only displays quantities to replenish when they fall within the forecasted date
443-
window, ensuring orders are placed precisely when needed.
444-
445-
.. image:: reordering_rules/replenishment-info.png
446-
:alt: Show forecasted date in Odoo.
447-
448-
The *just-in-time* logic ensures replenishment happens only when it's necessary for the forecasted
449-
date's demand, helping avoid overstocking.
450-
451-
For example:
452-
453-
- If the forecasted quantity drops below the minimum **on** the forecasted date, replenishment must
454-
begin immediately to avoid shortages.
455-
- If the quantity drops below the minimum **after** the forecasted date, replenishment can wait.
456-
457-
The **To Order** quantity is the total demand on the forecasted date.
458-
459-
By timing purchase orders based on the combined lead times, Odoo optimizes stock levels, keeping
460-
inventory minimal while ensuring future requirements are ordered at the last possible
461-
moment—strategic procrastination without the stress!
462-
463-
Common confusion about forecasted quantities
464-
--------------------------------------------
465-
466-
|SOs| due **after** the :guilabel:`Forecasted Date` are not accounted for in the
467-
:guilabel:`Forecast` quantities of the reordering rule.
468-
469-
They are, however, accounted for on the forecasted report that is opened by clicking the
470-
:icon:`fa-area-chart` :guilabel:`(graph)` icon on the replenishment report, as this one represents
471-
the **long-term forecasted quantity**.
472-
473-
.. example::
474-
475-
.. figure:: reordering_rules/zero-forecast.png
476-
:alt: Forecast and To Order quantities is zero.
477-
478-
Continuing the above example, when the sales order's deadline is adjusted to December 4th, the
479-
:guilabel:`Forecast` and :guilabel:`To Order` quantities are zero.
480-
481-
.. figure:: reordering_rules/five-forecast.png
482-
:alt: Show forecasted report.
483-
484-
Opening the :guilabel:`Forecasted Report` shows the :guilabel:`Forecasted` units is `5.00`.
389+
.. seealso::
390+
:doc:`Just-in-time logic <just_in_time>`
485391

486392
.. _inventory/warehouses_storage/visibility-days:
487393

@@ -493,6 +399,11 @@ planned replenishment. Odoo checks if forecasted stock on the forecasted date wi
493399
minimum in the reordering rule. **Only if** it is time to reorder, visibility days check additional
494400
future demand by the specified number of days.
495401

402+
.. note::
403+
Visibility days extend the standard just-in-time replenishment logic by looking beyond the
404+
immediate forecasted date. To fully understand how Odoo determines when replenishment is
405+
triggered, refer to the :doc:`Just-in-time logic <just_in_time>`
406+
496407
This feature helps consolidate orders by grouping immediate and near-future needs, reducing
497408
transport costs and enabling supplier discounts for larger orders.
498409

content/applications/inventory_and_mrp/inventory/warehouses_storage/replenishment/report.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ In each line of the replenishment report, clicking the :icon:`fa-info-circle` :g
119119
icon opens the :guilabel:`Replenishment Information` pop-up window, which displays the *lead times*
120120
and *forecasted date*.
121121

122-
For detailed information on how to use this feature for replenishment, go to the :ref:`Just in time
123-
logic <inventory/warehouses_storage/just-in-time>` section.
122+
For detailed information on how to use this feature for replenishment, go to the :doc:`just-in-time
123+
<just_in_time>` section.
124124

125125
Select a warehouse
126126
------------------

0 commit comments

Comments
 (0)