Skip to content

Commit

Permalink
fixup! shopfloor: imp single_pack_transfer confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
TDu committed Aug 29, 2023
1 parent c883b34 commit ae2cf76
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions shopfloor/services/single_pack_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ae2cf76

Please sign in to comment.