Skip to content

Conversation

@Camille0907
Copy link

@Camille0907 Camille0907 commented Dec 19, 2025

Migration of mrp_multi_level_consume_safety_stock to 18.0 (from #1169)


Also add a small fix into mrp_multi_level: Ensure the safety stock is rebuilt as soon as the target date is reached, even if a supply comes a few days after (Needed for mrp_multi_level_consume_safety_stock tests to pass)

This completes 57cba495:

If I have 0 units, my safety stock is 5 units and its target date is tomorrow, the procurement recommendation should be 5 units for tomorrow, even if I have a resupply of 5 the day after tomorrow.

gurneyalex and others added 3 commits December 12, 2025 10:12
This module complements the `mrp_multi_level` module by allowing to set a date
on the mrp.area records until which no attempt to rebuild safety stock will be
attempted: the safety stock will be used, if the running stock get below zero,
then a resupply will be created to bring back the stock to zero.

The idea is that your area may be under tension at a given moment (maybe
some workers are off, maybe there is high demand from customers) and you
can barely keep up with the demand. In this case, you can set
Safety stock rebuild lead date to a date in the future at
which you anticipate that the situation will have been fixed.
@OCA-git-bot
Copy link
Contributor

Hi @LoisRForgeFlow, @JordiBForgeFlow,
some modules you are maintaining are being modified, check this out!

@Camille0907 Camille0907 changed the title 18.0 mig mrp multi level consume safety stock [MIG] mrp_multi_level_consume_safety_stock: Migration to 18.0 Dec 19, 2025
@Camille0907 Camille0907 changed the title [MIG] mrp_multi_level_consume_safety_stock: Migration to 18.0 [MIG] mrp_multi_level_consume_safety_stock: Migration to 18.0 Dec 19, 2025
…as the target date is reached, even if a supply comes a few days after

(Needed for `mrp_multi_level_consume_safety_stock` tests to pass)

This completes OCA@57cba495:

If I have 0 units, my safety stock is 5 units and its target date is tomorrow, the procurement recommendation should be 5 units for tomorrow, even if I have a resupply of 5 the day after tomorrow.
@Camille0907 Camille0907 force-pushed the 18.0-mig-mrp_multi_level_consume_safety_stock branch from a684446 to 8fc61e3 Compare December 19, 2025 16:15
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Camille0907 This is outside of the migration, can you add a test case for this?

Copy link

@vvrossem vvrossem Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the commit message, a test case already covers this, but was previously failing (TBC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants