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

[IMP] stock_available_to_promise_release: set move to need release after pick cancel #864

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

sbejaoui
Copy link
Contributor

if we manually cancel one of picking chain we set the dest moves to need_release so they can be released again

…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
@sbejaoui sbejaoui force-pushed the 16.0-stock_available_to_promise_release-2-sbj branch from a249818 to edda871 Compare March 14, 2024 14:38
Copy link
Sponsor Contributor

@lmignon lmignon left a 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)

Copy link
Contributor

@jbaudoux jbaudoux left a 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
Copy link
Contributor

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.

@jbaudoux
Copy link
Contributor

jbaudoux commented Apr 9, 2024

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

Fixed here #819 (comment) in commit 948637a

@jbaudoux
Copy link
Contributor

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

Fixed here #819 (comment) in commit 948637a

And here #905

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.

None yet

3 participants