From 27d5a92fee6370c6e16ce4f5c3d5ea98ae582479 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 25 Sep 2018 19:12:19 -0500 Subject: [PATCH] Tweak purchasing / receiving UI a bit rows with 'out of stock' status are yellow; improve some row filter labels --- tailbone/views/purchasing/batch.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tailbone/views/purchasing/batch.py b/tailbone/views/purchasing/batch.py index ff7cec6b..ef105df7 100644 --- a/tailbone/views/purchasing/batch.py +++ b/tailbone/views/purchasing/batch.py @@ -610,10 +610,17 @@ class PurchasingBatchView(BatchMasterView): g.set_type('invoice_total', 'currency') g.set_type('credits', 'boolean') + # we only want the grid column to have abbreviated label, but *not* the filter + # TODO: would be nice to somehow make this simpler g.set_label('cases_ordered', "Cases Ord.") + g.filters['cases_ordered'].label = "Cases Ordered" g.set_label('units_ordered', "Units Ord.") + g.filters['units_ordered'].label = "Units Ordered" g.set_label('cases_received', "Cases Rec.") + g.filters['cases_received'].label = "Cases Received" g.set_label('units_received', "Units Rec.") + g.filters['units_received'].label = "Units Received" + g.set_label('po_total', "Total") g.set_label('invoice_total', "Total") g.set_label('credits', "Credits?") @@ -629,7 +636,8 @@ class PurchasingBatchView(BatchMasterView): row.STATUS_CASE_QUANTITY_DIFFERS, row.STATUS_ORDERED_RECEIVED_DIFFER, row.STATUS_TRUCKDUMP_UNCLAIMED, - row.STATUS_TRUCKDUMP_PARTCLAIMED): + row.STATUS_TRUCKDUMP_PARTCLAIMED, + row.STATUS_OUT_OF_STOCK): return 'notice' def configure_row_form(self, f):