Skip to content

[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

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

Conversation

rousseldenis
Copy link
Contributor

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).

@OCA-git-bot
Copy link
Contributor

Hi @sebalix, @mt-software-de, @jbaudoux,
some modules you are maintaining are being modified, check this out!

@rousseldenis rousseldenis added enhancement New feature or request needs review labels Apr 23, 2025
@rousseldenis rousseldenis added this to the 16.0 milestone Apr 23, 2025
@rousseldenis rousseldenis force-pushed the 16.0-imp-release-cancel-dro branch from 23b31b4 to dfb9b5d Compare April 23, 2025 12:26
Copy link
Contributor

@mt-software-de mt-software-de left a 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.

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.

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)
Copy link
Contributor

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 ?

cc @mt-software-de

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).
@rousseldenis rousseldenis force-pushed the 16.0-imp-release-cancel-dro branch from dfb9b5d to 3018642 Compare April 23, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants