Let inventory batch handler decide if case input is allowed
This commit is contained in:
parent
0704717ec5
commit
2532fcbea2
|
@ -67,10 +67,6 @@ class InventoryBatchView(BatchMasterView):
|
|||
mobile_creatable = True
|
||||
mobile_rows_creatable = True
|
||||
|
||||
# set to False to prevent exposing case fields for user input,
|
||||
# when the batch count mode is "adjust only"
|
||||
allow_adjustment_cases = True
|
||||
|
||||
# set to True for the UI to "prefer" case amounts, as opposed to unit
|
||||
prefer_cases = False
|
||||
|
||||
|
@ -309,12 +305,9 @@ class InventoryBatchView(BatchMasterView):
|
|||
'prefer_cases': self.prefer_cases,
|
||||
})
|
||||
|
||||
# TODO: deprecate / remove this
|
||||
def allow_cases(self, batch):
|
||||
if batch.mode == self.enum.INVENTORY_MODE_ADJUST:
|
||||
if self.allow_adjustment_cases:
|
||||
return True
|
||||
return False
|
||||
return True
|
||||
return self.handler.allow_cases(batch)
|
||||
|
||||
def should_aggregate_products(self, batch):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue