Skip to content

Commit

Permalink
shopfloor_reception: Make select picking by product optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mmequignon committed Sep 25, 2023
1 parent f03abcc commit 3a37ebe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion shopfloor_reception/data/shopfloor_scenario_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<field name="options_edit">
{
"auto_post_line": true,
"allow_return": true
"allow_return": true,
"scan_location_or_pack_first": true
}
</field>
</record>
Expand Down
7 changes: 6 additions & 1 deletion shopfloor_reception/services/reception.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,12 @@ def start(self):
def _scan_document__get_handlers_by_type(self):
return {
"picking": self._scan_document__by_picking,
"product": self._scan_document__by_product,
# only add the handler if scan_location_or_pack_first is disabled
"product": (
self._scan_document__by_product
if not self.work.menu.scan_location_or_pack_first
else None
),
"packaging": self._scan_document__by_packaging,
"lot": self._scan_document__by_lot,
"origin_move": self._scan_document__by_origin_move,
Expand Down

0 comments on commit 3a37ebe

Please sign in to comment.