Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] stock: remove mto link when product is stolen #162887

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 22, 2024

A lot of users don't understand why they can't reserve after moving a product with an immediate transfer. It's due to the double check of _action_assign that check where the move orig stored the product and check the quants for this exact location. In our case the product was moved so the match doesn't work.

We introduce an new parameter to check if modifying the behavior on those cases would work. When _free_reservation is call on a move.line we expect to never find it at this place anymore (except if we bring it back). Then we drop the reservation base on MTO process and only check if there is a quantity in a sub location of the stock.move

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #155118
Forward-Port-Of: #154912

A lot of users don't understand why they can't reserve in MTO chain after
moving a product with an immediate transfer. It's due to the double check of
_action_assign that look where the move orig stored the product and
if the quants exist in this exact location. In our case the product was
moved so the match doesn't work.

We introduce an new parameter to check if modifying the behavior on
those cases could work. When _free_reservation is call on a
`stock.move.line`, we expect to never find it at this place
anymore (except if we bring it back). Then we drop the MTO link
for this step and use the MTS reservation.

WARNING, this parameter could remove too many mto links. e.g.
There is multiple stock.move.line linked to different locations
they will lose the link for product remaining in the same place.

X-original-commit: 1370800
@robodoo
Copy link
Contributor

robodoo commented Apr 22, 2024

Pull request status dashboard.

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 22, 2024

This PR targets saas-17.1 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 22, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 22, 2024
robodoo pushed a commit that referenced this pull request Apr 23, 2024
A lot of users don't understand why they can't reserve in MTO chain after
moving a product with an immediate transfer. It's due to the double check of
_action_assign that look where the move orig stored the product and
if the quants exist in this exact location. In our case the product was
moved so the match doesn't work.

We introduce an new parameter to check if modifying the behavior on
those cases could work. When _free_reservation is call on a
`stock.move.line`, we expect to never find it at this place
anymore (except if we bring it back). Then we drop the MTO link
for this step and use the MTS reservation.

WARNING, this parameter could remove too many mto links. e.g.
There is multiple stock.move.line linked to different locations
they will lose the link for product remaining in the same place.

closes #162887

X-original-commit: 1370800
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
@robodoo robodoo closed this Apr 23, 2024
@fw-bot fw-bot deleted the saas-17.1-16.0-release-mto-on-steal-arm-RV5B-fw branch May 7, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants