From b311c6be7d92ceefc968a4fd73b1cc60fc3e3cca Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 21 Oct 2019 15:35:30 -0500 Subject: [PATCH] Add config flag to "force unit item" for inventory batch --- tailbone/views/inventory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tailbone/views/inventory.py b/tailbone/views/inventory.py index a6ec275d..96ec46b3 100644 --- a/tailbone/views/inventory.py +++ b/tailbone/views/inventory.py @@ -528,7 +528,8 @@ class InventoryBatchView(BatchMasterView): product = self.find_product(entry) if product: - force_unit_item = True # TODO: make configurable? + force_unit_item = self.rattail_config.getbool( + 'tailbone', 'inventory.force_unit_item', default=False) if force_unit_item and product.is_pack_item(): product = product.unit self.request.session.flash("You scanned a pack item, but must count the units instead.", 'error')