Remove unused (I think?) VendorFieldRenderer

This commit is contained in:
Lance Edgar 2016-11-05 02:08:10 -05:00
parent 732453eedc
commit 8fe0e96273
2 changed files with 1 additions and 15 deletions

View file

@ -42,8 +42,7 @@ from .users import UserFieldRenderer, PermissionsFieldRenderer
from .employees import EmployeeFieldRenderer from .employees import EmployeeFieldRenderer
from .products import (ProductFieldRenderer, GPCFieldRenderer, from .products import (ProductFieldRenderer, GPCFieldRenderer, BrandFieldRenderer,
BrandFieldRenderer, VendorFieldRenderer,
PriceFieldRenderer, PriceWithExpirationFieldRenderer) PriceFieldRenderer, PriceWithExpirationFieldRenderer)
from .stores import StoreFieldRenderer from .stores import StoreFieldRenderer

View file

@ -113,19 +113,6 @@ class BrandFieldRenderer(AutocompleteFieldRenderer):
service_route = 'brands.autocomplete' service_route = 'brands.autocomplete'
class VendorFieldRenderer(AutocompleteFieldRenderer):
"""
Renderer for :class:`rattail.db.model.Vendor` instance fields.
"""
service_route = 'vendors.autocomplete'
def render_readonly(self, **kwargs):
vendor = self.raw_value
if not vendor:
return ''
return "{0} - {1}".format(vendor.id, vendor.name)
class PriceFieldRenderer(TextFieldRenderer): class PriceFieldRenderer(TextFieldRenderer):
""" """
Renderer for fields which reference a :class:`ProductPrice` instance. Renderer for fields which reference a :class:`ProductPrice` instance.