diff --git a/shopfloor/services/zone_picking.py b/shopfloor/services/zone_picking.py index fa21fbdd0f2..12fe30f338b 100644 --- a/shopfloor/services/zone_picking.py +++ b/shopfloor/services/zone_picking.py @@ -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): @@ -907,7 +907,7 @@ 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( @@ -915,7 +915,7 @@ def _set_destination_location( 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) @@ -1186,6 +1186,7 @@ def set_destination( quantity, confirmation, location, + barcode, ) if response: if extra_message: