Changeset - d1b9d0e0407e
[Not reviewed]
0 1 0
Lance Edgar (lance) - 7 years ago 2017-09-28 14:07:56
lance@edbob.org
Don't auto-assign inventory batch count mode

this should be left to custom logic; sometimes it needs to be null
1 file changed with 0 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rattail/batch/inventory.py
Show inline comments
 
@@ -37,14 +37,12 @@ class InventoryBatchHandler(BatchHandler):
 
    """
 
    Handler for inventory batches.
 
    """
 
    batch_model_class = model.InventoryBatch
 

	
 
    def init_batch(self, batch, **kwargs):
 
        if batch.mode is None:
 
            batch.mode = self.enum.INVENTORY_MODE_REPLACE
 
        if batch.total_cost is None:
 
            batch.total_cost = 0
 

	
 
    def should_populate(self, batch):
 
        if batch.handheld_batches:
 
            return True
0 comments (0 inline, 0 general)