-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
base: 14.0
Are you sure you want to change the base?
Conversation
f511a2e
to
21f31bf
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.
LG
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.
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) |
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.
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
.
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.
ping @mmequignon
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.
Yes sorry, forgot to answer, I'll do this ASAP
def _set_destination_update_quantity__fallback( | ||
self, move_line, empty_rec, quantity | ||
): | ||
return None |
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.
Should it not also return a response ?
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.
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).
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.