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

[FIX][14.0] shopfloor cluster_picking: fix line split #986

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from

Conversation

mmequignon
Copy link
Member

@mmequignon mmequignon commented Feb 19, 2025

At scan_destination_pack when a destination package is scanned without any qty processed (especially when no prefill quantity is enabled), we would end up with a new move line with qty = 0.

Instead, return an error to the user.

@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_fix_line_split branch from f511a2e to 21f31bf Compare February 19, 2025 08:22
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.

LG

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.

LGTM


# Keeping second return value for compatibility
# Quantity already checked at _check_line_qty_processible
new_line, __ = move_line._split_qty_to_be_done(quantity)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also extend test_scan_destination_pack_bin_not_found and ensure that there is also no new stock.move.line created.
Because by moving _split_qty_to_be_done you fixed also the problem, that there is a stock.move.line created, when a wrong barcode is scanned and you entered a lower qty as product_uom_qty.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes sorry, forgot to answer, I'll do this ASAP

def _set_destination_update_quantity__fallback(
self, move_line, empty_rec, quantity
):
return None
Copy link
Member

Choose a reason for hiding this comment

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

Should it not also return a response ?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, response was initially set to None, and if no product or lot were found from barcode, None would be returned.
This is the trick used to do multiple things from a single shopfloor screen (increase quantities and set destination package).

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.

5 participants