diff --git a/tailbone/forms/renderers/products.py b/tailbone/forms/renderers/products.py index c3c82f52..d3438119 100644 --- a/tailbone/forms/renderers/products.py +++ b/tailbone/forms/renderers/products.py @@ -29,6 +29,7 @@ from __future__ import unicode_literals, absolute_import from rattail.gpc import GPC from formalchemy import TextFieldRenderer +from formalchemy.fields import SelectFieldRenderer from webhelpers.html import tags, literal from tailbone.forms.renderers.common import AutocompleteFieldRenderer @@ -78,7 +79,7 @@ class GPCFieldRenderer(TextFieldRenderer): return gpc -class DepartmentFieldRenderer(TextFieldRenderer): +class DepartmentFieldRenderer(SelectFieldRenderer): """ Shows the department number as well as the name. """ @@ -89,7 +90,7 @@ class DepartmentFieldRenderer(TextFieldRenderer): return "" -class SubdepartmentFieldRenderer(TextFieldRenderer): +class SubdepartmentFieldRenderer(SelectFieldRenderer): """ Shows the subdepartment number as well as the name. """ @@ -100,7 +101,7 @@ class SubdepartmentFieldRenderer(TextFieldRenderer): return "" -class CategoryFieldRenderer(TextFieldRenderer): +class CategoryFieldRenderer(SelectFieldRenderer): """ Shows the category number as well as the name. """ diff --git a/tailbone/views/products.py b/tailbone/views/products.py index eb5255d6..f1fddee4 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -49,7 +49,6 @@ from tailbone import forms, newgrids as grids from tailbone.db import Session from tailbone.views import MasterView, SearchableAlchemyGridView, AutocompleteView from tailbone.views.continuum import VersionView, version_defaults -from tailbone.forms.renderers import products as products_forms from tailbone.progress import SessionProgress @@ -285,9 +284,9 @@ class ProductsView(MasterView): fs.size, fs.weighed, fs.case_pack, - fs.department.with_renderer(products_forms.DepartmentFieldRenderer), - fs.subdepartment.with_renderer(products_forms.SubdepartmentFieldRenderer), - fs.category.with_renderer(products_forms.CategoryFieldRenderer), + fs.department, + fs.subdepartment, + fs.category, fs.family, fs.report_code, fs.regular_price,