diff --git a/tailbone/views/products.py b/tailbone/views/products.py index 752a996d..33615ef4 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -283,8 +283,6 @@ class ProductView(MasterView): g.joiners['code'] = lambda q: q.outerjoin(model.ProductCode) g.joiners['vendor'] = join_vendor g.joiners['vendor_any'] = join_vendor_any - g.joiners['vendor_code'] = join_vendor_code - g.joiners['vendor_code_any'] = join_vendor_code_any g.sorters['brand'] = g.make_sorter(model.Brand.name) g.sorters['subdepartment'] = g.make_sorter(model.Subdepartment.name) @@ -322,8 +320,19 @@ class ProductView(MasterView): g.filters['vendor'] = g.make_filter('vendor', model.Vendor.name) g.filters['vendor_any'] = g.make_filter('vendor_any', self.VendorAny.name) # factory=VendorAnyFilter, joiner=join_vendor_any) - g.filters['vendor_code'] = g.make_filter('vendor_code', ProductCostCode.code) - g.filters['vendor_code_any'] = g.make_filter('vendor_code_any', ProductCostCodeAny.code) + + # g.joiners['vendor_code_any'] = join_vendor_code_any + # g.filters['vendor_code_any'] = g.make_filter('vendor_code_any', ProductCostCodeAny.code) + # g.joiners['vendor_code'] = join_vendor_code + # g.filters['vendor_code'] = g.make_filter('vendor_code', ProductCostCode.code) + + # vendor_code* + g.set_joiner('vendor_code', join_vendor_code) + g.set_filter('vendor_code', ProductCostCode.code) + g.set_label('vendor_code', "Vendor Code (preferred)") + g.set_joiner('vendor_code_any', join_vendor_code_any) + g.set_filter('vendor_code_any', ProductCostCodeAny.code) + g.set_label('vendor_code_any', "Vendor Code (any)") # category g.set_joiner('category', lambda q: q.outerjoin(model.Category)) @@ -390,7 +399,7 @@ class ProductView(MasterView): g.set_label('vendor', "Vendor (preferred)") g.set_label('vendor_any', "Vendor (any)") - g.set_label('vendor', "Pref. Vendor") + g.set_label('vendor', "Vendor (preferred)") def configure_common_form(self, f): super(ProductView, self).configure_common_form(f)