Tweak some fields for Product view

This commit is contained in:
Lance Edgar 2016-11-27 14:17:42 -06:00
parent c8ec13d130
commit 948987232a
2 changed files with 7 additions and 7 deletions

View file

@ -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.
"""

View file

@ -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,