From 8c8d539266cc3f90a5e0827e57005538581e6a0e Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 10 Apr 2018 09:07:57 -0700 Subject: [PATCH] Add future mode for vendor catalog batch --- tailbone/templates/products/view.mako | 2 +- tailbone/views/vendors/catalogs.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tailbone/templates/products/view.mako b/tailbone/templates/products/view.mako index a6e157d1..8bfc9acc 100644 --- a/tailbone/templates/products/view.mako +++ b/tailbone/templates/products/view.mako @@ -181,7 +181,7 @@ Pref. Vendor - Code + Order Code Case Size Case Cost Unit Cost diff --git a/tailbone/views/vendors/catalogs.py b/tailbone/views/vendors/catalogs.py index 662a9462..a3d0c43e 100644 --- a/tailbone/views/vendors/catalogs.py +++ b/tailbone/views/vendors/catalogs.py @@ -72,6 +72,7 @@ class VendorCatalogsView(FileBatchMasterView): 'id', 'vendor', 'filename', + 'future', 'effective', 'created', 'created_by', @@ -90,6 +91,7 @@ class VendorCatalogsView(FileBatchMasterView): 'old_unit_cost', 'unit_cost', 'unit_cost_diff', + 'starts', 'status_code', ] @@ -138,6 +140,7 @@ class VendorCatalogsView(FileBatchMasterView): 'filename', 'parser_key', 'vendor_uuid', + 'future', ]) parser_values = [(p.key, p.display) for p in self.get_parsers()] @@ -164,10 +167,17 @@ class VendorCatalogsView(FileBatchMasterView): kwargs['vendor'] = batch.vendor elif batch.vendor_uuid: kwargs['vendor_uuid'] = batch.vendor_uuid + kwargs['future'] = batch.future return kwargs def configure_row_grid(self, g): super(VendorCatalogsView, self).configure_row_grid(g) + batch = self.get_instance() + + # starts + if not batch.future: + g.hide_column('starts') + g.set_label('upc', "UPC") g.set_label('brand_name', "Brand") g.set_label('old_unit_cost', "Old Cost")