Show "truck dump" info for applicable receiving batch page title

This commit is contained in:
Lance Edgar 2018-07-10 11:39:22 -05:00
parent 9dd6f8ef7d
commit ed6f2f27cc

View file

@ -230,6 +230,14 @@ class ReceivingBatchView(PurchasingBatchView):
return True
return False
def get_instance_title(self, batch):
title = super(ReceivingBatchView, self).get_instance_title(batch)
if batch.truck_dump:
title = "{} (TRUCK DUMP PARENT)".format(title)
elif batch.truck_dump_batch:
title = "{} (TRUCK DUMP CHILD)".format(title)
return title
def configure_form(self, f):
super(ReceivingBatchView, self).configure_form(f)
batch = f.model_instance