Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion shopfloor/data/shopfloor_scenario_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"unload_package_at_destination": true,
"multiple_move_single_pack": true,
"no_prefill_qty": true,
"scan_location_or_pack_first": true
"scan_location_or_pack_first": true,
"pick_by_product": true
}
</field>
</record>
Expand Down
19 changes: 17 additions & 2 deletions shopfloor/docs/cluster_picking_diag_seq.plantuml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Diagram to generate with PlantUML (https://plantuml.com/)
#
# $ sudo apt install plantuml
# $ plantuml cluster_picking_diag_seq.plantuml
# $ PLANTUML_LIMIT_SIZE=8192 plantuml cluster_picking_diag_seq.plantuml
#

@startuml
participant start
participant manual_selection
participant confirm_start

participant start_product
participant scan_product_destination

participant start_line
participant scan_destination
participant zero_check
Expand Down Expand Up @@ -48,12 +51,24 @@ manual_selection -[#red]> manual_selection: **/select(picking_batch_id)** \n(err
manual_selection -> confirm_start: **/select(picking_batch_id)**
manual_selection -> start: Button **Back** (client-side)

confirm_start -> start_product: **/confirm_start(picking_batch_id)** \n(pick_by_product enabled)
confirm_start -> start_line: **/confirm_start(picking_batch_id)**
confirm_start -> unload_all: **/confirm_start(picking_batch_id)** \n(we reopen a batch with all lines picked and have to be unloaded in the same destination)
confirm_start -> unload_single: **/confirm_start(picking_batch_id)** \n(we reopen a batch with all lines picked and have to be unloaded in different destinations)
confirm_start -> start: **/unassign(picking_batch_id)**

== Picking ==
== Picking all product quantities (optional) ==

start_product -[#red]> start_product: **/scan_product(picking_batch_id, barcode[product])** \n(error: wrong or unknown barcode)
start_product -> scan_product_destination: **/scan_product(picking_batch_id, barcode[product])** \n(product matches)

scan_product_destination -[#red]> scan_product_destination: **/scan_product_destination_pack(picking_batch_id, product_id, barcode[package], quantity)** \n(error: bin not found)
scan_product_destination -> start_product: **/scan_product_destination_pack(picking_batch_id, product_id, barcode[package], quantity)** \n(more products to process)
scan_product_destination -> start_line: **/scan_product_destination_pack(picking_batch_id, product_id, barcode[package], quantity)** \n(remaining lines to pick)
scan_product_destination -> unload_all: **/scan_product_destination_pack(picking_batch_id, product_id, barcode[package], quantity)** \n(all lines picked and same destination)
scan_product_destination -> unload_single: **/scan_product_destination_pack(picking_batch_id, product_id, barcode[package], quantity)** \n(all lines picked and different destinations)

== Picking line by line ==

start_line -[#red]> start_line: **/scan_line(picking_batch_id, move_line_id, barcode[package|product|lot])** \n(error)
start_line -> scan_destination: **/scan_line(picking_batch_id, move_line_id, barcode[package|product|lot])** \n(error)
Expand Down
Binary file modified shopfloor/docs/cluster_picking_diag_seq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions shopfloor/models/shopfloor_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,22 @@ class ShopfloorMenu(models.Model):
allow_alternative_destination_package_is_possible = fields.Boolean(
compute="_compute_allow_alternative_destination_package_is_possible"
)
pick_by_product = fields.Boolean(
string="Pick by product",
default=False,
help=(
"Instead of processing move lines one by one, the operator works "
"product by product. When confirmed, the batch shows the first product "
"to pick. After scanning the product and a destination bin, all its "
"lines in the batch are processed at once (qty done and destination "
"bin are set). Continues to the next product until all are completed. "
"Only applies to lines without a source package and not tracked by "
"lot/serial."
),
)
pick_by_product_is_possible = fields.Boolean(
compute="_compute_pick_by_product_is_possible"
)

@api.onchange("unload_package_at_destination")
def _onchange_unload_package_at_destination(self):
Expand Down Expand Up @@ -455,3 +471,10 @@ def _compute_allow_alternative_destination_package_is_possible(self):
menu.allow_alternative_destination_package_is_possible = (
menu.scenario_id.has_option("allow_alternative_destination_package")
)

@api.depends("scenario_id")
def _compute_pick_by_product_is_possible(self):
for menu in self:
menu.pick_by_product_is_possible = menu.scenario_id.has_option(
"pick_by_product"
)
Loading
Loading