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_creatable = True
|
||||||
mobile_rows_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
|
# set to True for the UI to "prefer" case amounts, as opposed to unit
|
||||||
prefer_cases = False
|
prefer_cases = False
|
||||||
|
|
||||||
|
@ -309,12 +305,9 @@ class InventoryBatchView(BatchMasterView):
|
||||||
'prefer_cases': self.prefer_cases,
|
'prefer_cases': self.prefer_cases,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# TODO: deprecate / remove this
|
||||||
def allow_cases(self, batch):
|
def allow_cases(self, batch):
|
||||||
if batch.mode == self.enum.INVENTORY_MODE_ADJUST:
|
return self.handler.allow_cases(batch)
|
||||||
if self.allow_adjustment_cases:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def should_aggregate_products(self, batch):
|
def should_aggregate_products(self, batch):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue