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][14.0] shopfloor delivery: Better messages #972

Closed

Conversation

mmequignon
Copy link
Member

@mmequignon mmequignon commented Jan 14, 2025

Now that return moves are possibly being created when a picking is unreleased, display a nice message to the user when trying to process a product that should be returned in stock.

Based on #971

@OCA-git-bot
Copy link
Contributor

Hi @simahawk, @sebalix, @guewen,
some modules you are maintaining are being modified, check this out!

@mmequignon mmequignon force-pushed the 14.0-shopfloor_delivery_handle_return branch from a3738f3 to a54680a Compare January 21, 2025 10:08
@mmequignon mmequignon force-pushed the 14.0-shopfloor_delivery_handle_return branch from fb9cced to 7bdedd1 Compare January 30, 2025 10:11
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.

Can you also drop the commits from the other PR from this one and add a test-requirement.txt to depend on the PR

Comment on lines +71 to +76
message = self._check_picking_status(pickings, states=states)
if message:
return message
message = self._check_picking_type(pickings)
if message:
return message
Copy link
Contributor

Choose a reason for hiding this comment

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

You should first check the picking type and then call _check_picking_status on the pickings with the right picking type.
Maybe _check_picking_type can return the list of filtered pickings and raise error if that list is empty.
Then call _check_picking_status on that result.

This is to ensure that you check the status on the pickings to process and not on a picking with a wrong picking type.

Copy link
Contributor

Choose a reason for hiding this comment

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

And extract if not pickings.exists() from _check_picking_status as it's not a status. This should be the first test. Then test picking type. And then test picking status.

Copy link
Contributor

Choose a reason for hiding this comment

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

And extract if not pickings.exists() from _check_picking_status as it's not a status. This should be the first test. Then test picking type. And then test picking status.

@mmequignon
Copy link
Member Author

closed in favor of closed in favor of #987

@mmequignon mmequignon closed this Feb 19, 2025
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.

3 participants