Hide 'ordered' columns for truck dump parent row grid
since that batch type is only concerned with receiving
This commit is contained in:
parent
a24076f0ce
commit
a348755be2
|
@ -666,6 +666,13 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
super(ReceivingBatchView, self).configure_row_grid(g)
|
||||
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):
|
||||
super(ReceivingBatchView, self).configure_row_form(f)
|
||||
f.set_readonly('cases_ordered')
|
||||
|
|
Loading…
Reference in a new issue