Remove unused (I think?) VendorFieldRenderer
This commit is contained in:
parent
732453eedc
commit
8fe0e96273
|
@ -42,8 +42,7 @@ from .users import UserFieldRenderer, PermissionsFieldRenderer
|
|||
|
||||
from .employees import EmployeeFieldRenderer
|
||||
|
||||
from .products import (ProductFieldRenderer, GPCFieldRenderer,
|
||||
BrandFieldRenderer, VendorFieldRenderer,
|
||||
from .products import (ProductFieldRenderer, GPCFieldRenderer, BrandFieldRenderer,
|
||||
PriceFieldRenderer, PriceWithExpirationFieldRenderer)
|
||||
|
||||
from .stores import StoreFieldRenderer
|
||||
|
|
|
@ -113,19 +113,6 @@ class BrandFieldRenderer(AutocompleteFieldRenderer):
|
|||
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):
|
||||
"""
|
||||
Renderer for fields which reference a :class:`ProductPrice` instance.
|
||||
|
|
Loading…
Reference in a new issue