Hide 'ordered' columns for truck dump parent row grid

since that batch type is only concerned with receiving
This commit is contained in:
Lance Edgar 2018-08-07 13:09:13 -05:00
parent a24076f0ce
commit a348755be2

View file

@ -666,6 +666,13 @@ class ReceivingBatchView(PurchasingBatchView):
super(ReceivingBatchView, self).configure_row_grid(g) super(ReceivingBatchView, self).configure_row_grid(g)
g.set_label('department_name', "Department") g.set_label('department_name', "Department")
# hide 'ordered' columns for truck dump parent, since that batch type
# is only concerned with receiving
batch = self.get_instance()
if batch.is_truck_dump_parent():
g.hide_column('cases_ordered')
g.hide_column('units_ordered')
def configure_row_form(self, f): def configure_row_form(self, f):
super(ReceivingBatchView, self).configure_row_form(f) super(ReceivingBatchView, self).configure_row_form(f)
f.set_readonly('cases_ordered') f.set_readonly('cases_ordered')