Skip to content

Commit

Permalink
fixup! fixup! fixup! shopfloor: imp zone_picking confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
TDu committed Aug 29, 2023
1 parent 7d7ae9b commit 858da73
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions shopfloor/services/zone_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,14 +889,14 @@ def scan_source(
)

def _set_destination_location(
self, move_line, package, quantity, confirmation, location
self, move_line, package, quantity, confirmation, location, barcode
):
location_changed = False
response = None

# A valid location is a sub-location of the original destination, or a
# any sub-location of the picking type's default destination location
# if `confirmation is True
# if `confirmation is equal to the barcode scanned.
# Ask confirmation to the user if the scanned location is not in the
# expected ones but is valid (in picking type's default destination)
if not self.is_dest_location_valid(move_line.move_id, location):
Expand All @@ -907,15 +907,15 @@ def _set_destination_location(
)
return (location_changed, response)

if confirmation != location.barcode and self.is_dest_location_to_confirm(
if confirmation != barcode and self.is_dest_location_to_confirm(
move_line.location_dest_id, location
):
response = self._response_for_set_line_destination(
move_line,
message=self.msg_store.confirm_location_changed(
move_line.location_dest_id, location
),
confirmation_required=location.barcode,
confirmation_required=barcode,
qty_done=quantity,
)
return (location_changed, response)
Expand Down Expand Up @@ -1186,6 +1186,7 @@ def set_destination(
quantity,
confirmation,
location,
barcode,
)
if response:
if extra_message:
Expand Down

0 comments on commit 858da73

Please sign in to comment.