-
-
Notifications
You must be signed in to change notification settings - Fork 199
[IMP] stock_release_channel: Allow to sleep and reassign pickings #1011
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
base: 16.0
Are you sure you want to change the base?
Conversation
Hi @sebalix, @mt-software-de, @jbaudoux, |
23b31b4
to
dfb9b5d
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.
Thx. This sounds great.
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.
What about only keeping the sleep action and show a confirmation wizard if there are started or done pickings ? Something similar to https://github.com/OCA/wms/blob/16.0/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py#L187
You can highlight discard
button in the wizard and have a sleep & reassign
button calling that safe sleep
self._check_is_action_sleep_allowed() | ||
pickings_to_unassign = self.env["stock.picking"].search( | ||
self._get_picking_to_unassign_domain() | ||
) | ||
pickings_to_unassign.write({"release_channel_id": False}) | ||
pickings_to_unassign.unrelease() | ||
pickings_to_unassign.unrelease(safe_unrelease=safe_sleep) |
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.
We need to fix conflict with #1009
If you enable to return done pickings on the route, then it will not reassign as generating a return is now considered as a safe unrelease.
Should we add another argument to prevent any return ?
In some cases, we don't want to use an open channel to deliver pickings anymore. But the internal transfers may have been done. In that case, we should not unrelease done pickings but just removing the channel and triggering an assignation (to put those transfers in another open channel).
dfb9b5d
to
3018642
Compare
In some cases, we don't want to use an open channel to deliver pickings anymore. But the internal transfers may have been done.
In that case, we should not unrelease done pickings but just removing the channel and triggering an assignation (to put those transfers in another open channel).