From ae2cf7647c71d97d1f5d3687c4c945a1ca161a4e Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Tue, 29 Aug 2023 13:40:29 +0200 Subject: [PATCH] fixup! shopfloor: imp single_pack_transfer confirm --- shopfloor/services/single_pack_transfer.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/shopfloor/services/single_pack_transfer.py b/shopfloor/services/single_pack_transfer.py index 4c61fa957e1..38f30e8fb48 100644 --- a/shopfloor/services/single_pack_transfer.py +++ b/shopfloor/services/single_pack_transfer.py @@ -41,9 +41,9 @@ def _data_after_package_scanned(self, package_level): def _response_for_start(self, message=None, popup=None): return self._response(next_state="start", message=message, popup=popup) - def _response_for_confirm_start(self, package_level, message=None): + def _response_for_confirm_start(self, package_level, message=None, barcode=""): data = self._data_after_package_scanned(package_level) - data["confirmation_required"] = package_level.package_id.name + data["confirmation_required"] = barcode return self._response( next_state="start", data=data, @@ -164,9 +164,11 @@ def start(self, barcode, confirmation=None): message=self.msg_store.no_putaway_destination_available() ) - if package_level.is_done and confirmation != package.name: + if package_level.is_done and confirmation != barcode: return self._response_for_confirm_start( - package_level, message=self.msg_store.already_running_ask_confirmation() + package_level, + message=self.msg_store.already_running_ask_confirmation(), + barcode=barcode, ) if not package_level.is_done: package_level.is_done = True