diff --git a/shopfloor/services/cluster_picking.py b/shopfloor/services/cluster_picking.py index d54ef12b9f6..b85abb3eae7 100644 --- a/shopfloor/services/cluster_picking.py +++ b/shopfloor/services/cluster_picking.py @@ -97,7 +97,7 @@ def _response_for_start_line( self, move_line, message=None, popup=None, sublocation=None ): kw = {"sublocation": self.data.location(sublocation)} if sublocation else {} - data = self._data_move_line(move_line, **kw) + data = self._data_move_line(move_line, no_qty_available=True, **kw) return self._response( next_state="start_line", data=data, @@ -107,9 +107,14 @@ def _response_for_start_line( def _response_for_scan_destination(self, move_line, message=None, qty_done=None): if qty_done is None: - data = self._data_move_line(move_line) + data = self._data_move_line( + move_line, + no_qty_available=True, + ) else: - data = self._data_move_line(move_line, qty_done=qty_done) + data = self._data_move_line( + move_line, no_qty_available=True, qty_done=qty_done + ) last_picked_line = self._last_picked_line(move_line.picking_id) if last_picked_line: # suggest pack to be used for the next line @@ -406,9 +411,10 @@ def _data_move_line(self, line, **kw): data["batch"] = self.data.picking_batch(batch) data["picking"] = self.data.picking(picking) data["postponed"] = line.shopfloor_postponed - data["product"]["qty_available"] = product.with_context( - location=line.location_id.id - ).qty_available + if "no_qty_available" not in kw or not kw.get("no_qty_available"): + data["product"]["qty_available"] = product.with_context( + location=line.location_id.id + ).qty_available data["scan_location_or_pack_first"] = self.work.menu.scan_location_or_pack_first data.update(kw) return data