Add config flag to "force unit item" for inventory batch
This commit is contained in:
parent
65bcd8da2a
commit
b311c6be7d
|
@ -528,7 +528,8 @@ class InventoryBatchView(BatchMasterView):
|
||||||
product = self.find_product(entry)
|
product = self.find_product(entry)
|
||||||
if product:
|
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():
|
if force_unit_item and product.is_pack_item():
|
||||||
product = product.unit
|
product = product.unit
|
||||||
self.request.session.flash("You scanned a pack item, but must count the units instead.", 'error')
|
self.request.session.flash("You scanned a pack item, but must count the units instead.", 'error')
|
||||||
|
|
Loading…
Reference in a new issue