diff --git a/shopfloor/services/cluster_picking.py b/shopfloor/services/cluster_picking.py index cb138e7481..bbd30e1a8e 100644 --- a/shopfloor/services/cluster_picking.py +++ b/shopfloor/services/cluster_picking.py @@ -444,11 +444,13 @@ def scan_line(self, picking_batch_id, move_line_id, barcode, sublocation_id=None have to precise what they want by scanning one of: * pack - * product * lot + * product + The result must be unambigous. For instance if we scan a product but the - product is tracked by lot, scanning the lot has to be required. + product is tracked by lot, scanning the lot has to be required. We support + multi valued barcodes (like GS1) if lot is provided along with product. `sublocation_id` is used when the scan_location_or_pack_first option is switched on and the location contains multiple products with no lot or package. @@ -488,6 +490,9 @@ def scan_line(self, picking_batch_id, move_line_id, barcode, sublocation_id=None product = search.product_from_scan(barcode) if product and move_line.product_id == product: + lot = search.lot_from_scan(barcode, products=move_line.product_id) + if lot and move_line.lot_id == lot: + return self._scan_line_by_lot(picking, move_line, lot, sublocation) return self._scan_line_by_product(picking, move_line, product, sublocation) packaging = search.packaging_from_scan(barcode) diff --git a/shopfloor/services/location_content_transfer.py b/shopfloor/services/location_content_transfer.py index 20be2ed373..fb05667d85 100644 --- a/shopfloor/services/location_content_transfer.py +++ b/shopfloor/services/location_content_transfer.py @@ -606,9 +606,9 @@ def scan_line(self, location_id, move_line_id, barcode): search = self._actions_for("search") handlers = { "package": self._scan_line__by_package, + "lot": self._scan_line__by_lot, "product": self._scan_line__by_product, "packaging": self._scan_line__by_packaging, - "lot": self._scan_line__by_lot, "none": self._scan_line__fallback, } try: