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

[15.0][FIX] repair_stock_move: On starting the repair do the confirmation of stock moves #73

Conversation

AaronHForgeFlow
Copy link
Contributor

Do the confirmation of moves instead of direct assignment. It may happen that the stock moves are already confirmed without quantity reserved in the quant. This cause an error when trying to do the unreservation that is performed in the _action_assign. Doing the _action_confirm is safer because it does the reservation and then the assignment and in the assignment, when the reservation is made: https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_move_line.py#L388 the is no issues

If we don't do this, and the moves are confirmed without reservation, then you may end with this error:

image

cc @ForgeFlow

…n the stock moves

instead of direct assignment. It may happen that the stock moves are confimed without
quantity reserved in the quant. This cause an error when trying to do the unreservation
that is performed in the _action_assign. Doing the _action_cofirm is safer because
it does the reservation and then the assignment and in the assigment, when the reservation
is made: https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_move_line.py#L388
thre is no issues
@AaronHForgeFlow
Copy link
Contributor Author

Incorrect solution

@AaronHForgeFlow AaronHForgeFlow deleted the 15.0-fix-repair_stock_move-reservation branch December 13, 2024 10:43
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.

1 participant