From a348755be2bbc4c731ffaff0a3e0b1779606189b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 7 Aug 2018 13:09:13 -0500 Subject: [PATCH] Hide 'ordered' columns for truck dump parent row grid since that batch type is only concerned with receiving --- tailbone/views/purchasing/receiving.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tailbone/views/purchasing/receiving.py b/tailbone/views/purchasing/receiving.py index 7d21abb2..7b602523 100644 --- a/tailbone/views/purchasing/receiving.py +++ b/tailbone/views/purchasing/receiving.py @@ -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')