diff --git a/tailbone/views/purchasing/receiving.py b/tailbone/views/purchasing/receiving.py index 511f8164..4632723d 100644 --- a/tailbone/views/purchasing/receiving.py +++ b/tailbone/views/purchasing/receiving.py @@ -84,7 +84,6 @@ class ReceivingBatchView(PurchasingBatchView): rows_editable = False rows_editable_but_not_directly = True - rows_deletable = True default_uom_is_case = True @@ -379,24 +378,8 @@ class ReceivingBatchView(PurchasingBatchView): if not super(ReceivingBatchView, self).row_deletable(row): return False - batch = row.batch - - # can always delete rows from truck dump parent - if batch.is_truck_dump_parent(): - return True - - # can always delete rows from truck dump child - elif batch.is_truck_dump_child(): - return True - - else: # okay, normal batch - if batch.order_quantities_known: - return False - else: # allow delete if receiving rom scratch - return True - - # cannot delete row by default - return False + # otherwise let handler decide + return self.batch_handler.is_row_deletable(row) def get_instance_title(self, batch): title = super(ReceivingBatchView, self).get_instance_title(batch)