Skip to content

Conversation

@gurneyalex
Copy link
Member

In #535 a fix was introduced to take info account moves which have the stock.buffer's location in their final destination. This introduced a bug when different chained moves are moving a product towards its buffer location, as all the moves will be counted, resulting in a wrong net flow position (among others).

I propose to fix this with the following check: if a move with the final destination under the buffer's location has a matching final destination, and there are pending chained moves with the same final destination, these moves will be in our list: the current move needs to be disregarded.

We may still have a problem if the there are some cancelled moves and the total quantity does not match the original expected quantity, but this should be rare, so I'm not considering this in the current PR.

In OCA#535 a fix was introduced to take
info account moves which have the stock.buffer's location in their final
destination. This introduced a bug when different chained moves are
moving a product towards its buffer location, as all the moves will be
counted, resulting in a wrong net flow position (among others).

I propose to fix this with the following check: if a move with the final
destination under the buffer's location has a matching
final destination, and there are pending chained moves with
the same final destination, these moves will be in our list:
the current move needs to be disregarded.

We may still have a problem if the there are some cancelled
moves and the total quantity does not match the original expected
quantity, but this should be rare, so I'm not considering this in the
current PR.
@OCA-git-bot
Copy link
Contributor

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

@LoisRForgeFlow
Copy link
Contributor

@gurneyalex It makes sense but I have a doubt: how do you get the final location that way in a route without push rules?

For instance, in an interwarehouse in which the 2 transfers are pre-created the final location of the first step is not WH2/Stock, it is the transit one.

image

Just wondering to understand the full context.

Also, if possible, I would like a test covering the case.

@LoisRForgeFlow LoisRForgeFlow changed the title [FIX] ddmrp: fix _calc_incoming_dld_qty and _calc_qualified_demand [18.0][FIX] ddmrp: fix _calc_incoming_dld_qty and _calc_qualified_demand Oct 24, 2025
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

waiting feedback to my comment #567 (comment)

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.

4 participants