Add future mode for vendor catalog batch
This commit is contained in:
parent
8ea769d0e5
commit
8c8d539266
|
@ -181,7 +181,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<th>Pref.</th>
|
<th>Pref.</th>
|
||||||
<th>Vendor</th>
|
<th>Vendor</th>
|
||||||
<th>Code</th>
|
<th>Order Code</th>
|
||||||
<th>Case Size</th>
|
<th>Case Size</th>
|
||||||
<th>Case Cost</th>
|
<th>Case Cost</th>
|
||||||
<th>Unit Cost</th>
|
<th>Unit Cost</th>
|
||||||
|
|
10
tailbone/views/vendors/catalogs.py
vendored
10
tailbone/views/vendors/catalogs.py
vendored
|
@ -72,6 +72,7 @@ class VendorCatalogsView(FileBatchMasterView):
|
||||||
'id',
|
'id',
|
||||||
'vendor',
|
'vendor',
|
||||||
'filename',
|
'filename',
|
||||||
|
'future',
|
||||||
'effective',
|
'effective',
|
||||||
'created',
|
'created',
|
||||||
'created_by',
|
'created_by',
|
||||||
|
@ -90,6 +91,7 @@ class VendorCatalogsView(FileBatchMasterView):
|
||||||
'old_unit_cost',
|
'old_unit_cost',
|
||||||
'unit_cost',
|
'unit_cost',
|
||||||
'unit_cost_diff',
|
'unit_cost_diff',
|
||||||
|
'starts',
|
||||||
'status_code',
|
'status_code',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -138,6 +140,7 @@ class VendorCatalogsView(FileBatchMasterView):
|
||||||
'filename',
|
'filename',
|
||||||
'parser_key',
|
'parser_key',
|
||||||
'vendor_uuid',
|
'vendor_uuid',
|
||||||
|
'future',
|
||||||
])
|
])
|
||||||
|
|
||||||
parser_values = [(p.key, p.display) for p in self.get_parsers()]
|
parser_values = [(p.key, p.display) for p in self.get_parsers()]
|
||||||
|
@ -164,10 +167,17 @@ class VendorCatalogsView(FileBatchMasterView):
|
||||||
kwargs['vendor'] = batch.vendor
|
kwargs['vendor'] = batch.vendor
|
||||||
elif batch.vendor_uuid:
|
elif batch.vendor_uuid:
|
||||||
kwargs['vendor_uuid'] = batch.vendor_uuid
|
kwargs['vendor_uuid'] = batch.vendor_uuid
|
||||||
|
kwargs['future'] = batch.future
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
def configure_row_grid(self, g):
|
def configure_row_grid(self, g):
|
||||||
super(VendorCatalogsView, self).configure_row_grid(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('upc', "UPC")
|
||||||
g.set_label('brand_name', "Brand")
|
g.set_label('brand_name', "Brand")
|
||||||
g.set_label('old_unit_cost', "Old Cost")
|
g.set_label('old_unit_cost', "Old Cost")
|
||||||
|
|
Loading…
Reference in a new issue