From a66ea537436374f1f7fb6c3b2c6b6895b8bab27e Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 18 Apr 2019 17:02:24 -0500 Subject: [PATCH] Declare row fields for vendor catalog batches also exposes new "allowance" fields --- tailbone/views/vendors/catalogs.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tailbone/views/vendors/catalogs.py b/tailbone/views/vendors/catalogs.py index c8c5e30c..1eecdda9 100644 --- a/tailbone/views/vendors/catalogs.py +++ b/tailbone/views/vendors/catalogs.py @@ -95,6 +95,35 @@ class VendorCatalogsView(FileBatchMasterView): 'status_code', ] + row_form_fields = [ + 'sequence', + 'item_entry', + 'product', + 'upc', + 'brand_name', + 'description', + 'size', + 'old_vendor_code', + 'vendor_code', + 'old_case_size', + 'case_size', + 'old_case_cost', + 'case_cost', + 'case_cost_diff', + 'old_unit_cost', + 'unit_cost', + 'unit_cost_diff', + 'suggested_retail', + 'starts', + 'ends', + 'discount_starts', + 'discount_ends', + 'discount_amount', + 'discount_percent', + 'status_code', + 'status_text', + ] + def get_parsers(self): if not hasattr(self, 'parsers'): self.parsers = sorted(iter_catalog_parsers(), key=lambda p: p.display) @@ -197,6 +226,7 @@ class VendorCatalogsView(FileBatchMasterView): def configure_row_form(self, f): super(VendorCatalogsView, self).configure_row_form(f) f.set_renderer('product', self.render_product) + f.set_type('discount_percent', 'percent') def template_kwargs_create(self, **kwargs): parsers = self.get_parsers()