-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
[IMP] stock_available_to_promise_release: set move to need release after pick cancel #864
base: 16.0
Are you sure you want to change the base?
[IMP] stock_available_to_promise_release: set move to need release after pick cancel #864
Conversation
a249818
to
edda871
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense (Code review only)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also the case where you don't create a backorder on the pick when you process a partial quantity. In this case, I don't think action_cancel is called. I'll see to solve that one
lambda m: m.state not in ("draft", "cancel", "done") | ||
and not m.need_release | ||
) | ||
need_release_moves.need_release = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You cannot set the complete move as releasable. Only the canceled quantity can be releasable.
If you have a ship of 10 units. You pick 6 and you cancel the backorder of 4, then you cannot mark the 10 units back as releasable.
You also forgot to manage the case where it's more steps than pick-ship, like pick-pack-ship. Seems you put the pack as need_release. Anyway, that's more complicate than that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbaudoux I'm on it. A first test suggests that this code introduces malicious behavior if a partial quantity is picked and the release process is called again on the ship. The new pick is generated for the original quantity without taking into account what has already been prepared.
Fixed here #819 (comment) in commit 948637a |
And here #905 |
edda871
to
2697c64
Compare
…ter pick cancel if we manually cancel one of picking chain we set the dest moves to need_release so they can be released again
2697c64
to
3391a78
Compare
if we manually cancel one of picking chain we set the dest moves to need_release so they can be released again