From 12b567d3d21f5eb87044fa6a2b98a1482b70ebb0 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 29 Mar 2020 13:09:14 -0500 Subject: [PATCH] Let inventory batch handler decide what to do about unknown product scan --- tailbone/views/batch/inventory.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tailbone/views/batch/inventory.py b/tailbone/views/batch/inventory.py index 373b8f56..b15ed089 100644 --- a/tailbone/views/batch/inventory.py +++ b/tailbone/views/batch/inventory.py @@ -436,9 +436,6 @@ class InventoryBatchView(BatchMasterView): if self.viewing and not batch.executed and not batch.complete: f.remove_field('rowcount') - # TODO: document this, maybe move it etc. - unknown_product_creates_row = True - # TODO: this view can create new rows, with only a GET query. that should # probably be changed to require POST; for now we just require the "create # batch row" perm and call it good.. @@ -508,7 +505,7 @@ class InventoryBatchView(BatchMasterView): self.handler.add_row(batch, row) return row - elif self.unknown_product_creates_row: + elif self.handler.unknown_product_creates_row: row = model.InventoryBatchRow() row.upc = GPC(upc, calc_check_digit=False) # TODO: why not calc check digit? row.description = "(unknown product)"