Skip to content

Conversation

@rousseldenis
Copy link

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

@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

)
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
def _compute_is_action_safe_sleep_allowed(self):
for rec in self:
rec.is_action_safe_sleep_allowed = bool(
rec.state in ["locked", "open"] and rec.open_picking_ids
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think checking open_picking_ids is useful

Comment on lines +906 to +911
def action_sleep(self):
self._sleep()

def action_safe_sleep(self):
self._sleep(safe=True)
return {"type": "ir.actions.act_window_close"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not add a second button but manage it in existing action_sleep.
Test if there are done internal transfer.
If True, raise a wizard popup showing them and asking to confirm the reassignment of those to another channel. on confirm, call self._sleep(safe=True).
Else call self._sleep()

@github-actions
Copy link

github-actions bot commented Oct 5, 2025

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 5, 2025
@github-actions github-actions bot closed this Nov 9, 2025
@jbaudoux jbaudoux reopened this Nov 9, 2025
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 16, 2025
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