Tweak some fields for Product view
This commit is contained in:
parent
c8ec13d130
commit
948987232a
|
@ -29,6 +29,7 @@ from __future__ import unicode_literals, absolute_import
|
||||||
from rattail.gpc import GPC
|
from rattail.gpc import GPC
|
||||||
|
|
||||||
from formalchemy import TextFieldRenderer
|
from formalchemy import TextFieldRenderer
|
||||||
|
from formalchemy.fields import SelectFieldRenderer
|
||||||
from webhelpers.html import tags, literal
|
from webhelpers.html import tags, literal
|
||||||
|
|
||||||
from tailbone.forms.renderers.common import AutocompleteFieldRenderer
|
from tailbone.forms.renderers.common import AutocompleteFieldRenderer
|
||||||
|
@ -78,7 +79,7 @@ class GPCFieldRenderer(TextFieldRenderer):
|
||||||
return gpc
|
return gpc
|
||||||
|
|
||||||
|
|
||||||
class DepartmentFieldRenderer(TextFieldRenderer):
|
class DepartmentFieldRenderer(SelectFieldRenderer):
|
||||||
"""
|
"""
|
||||||
Shows the department number as well as the name.
|
Shows the department number as well as the name.
|
||||||
"""
|
"""
|
||||||
|
@ -89,7 +90,7 @@ class DepartmentFieldRenderer(TextFieldRenderer):
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
class SubdepartmentFieldRenderer(TextFieldRenderer):
|
class SubdepartmentFieldRenderer(SelectFieldRenderer):
|
||||||
"""
|
"""
|
||||||
Shows the subdepartment number as well as the name.
|
Shows the subdepartment number as well as the name.
|
||||||
"""
|
"""
|
||||||
|
@ -100,7 +101,7 @@ class SubdepartmentFieldRenderer(TextFieldRenderer):
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
class CategoryFieldRenderer(TextFieldRenderer):
|
class CategoryFieldRenderer(SelectFieldRenderer):
|
||||||
"""
|
"""
|
||||||
Shows the category number as well as the name.
|
Shows the category number as well as the name.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -49,7 +49,6 @@ from tailbone import forms, newgrids as grids
|
||||||
from tailbone.db import Session
|
from tailbone.db import Session
|
||||||
from tailbone.views import MasterView, SearchableAlchemyGridView, AutocompleteView
|
from tailbone.views import MasterView, SearchableAlchemyGridView, AutocompleteView
|
||||||
from tailbone.views.continuum import VersionView, version_defaults
|
from tailbone.views.continuum import VersionView, version_defaults
|
||||||
from tailbone.forms.renderers import products as products_forms
|
|
||||||
from tailbone.progress import SessionProgress
|
from tailbone.progress import SessionProgress
|
||||||
|
|
||||||
|
|
||||||
|
@ -285,9 +284,9 @@ class ProductsView(MasterView):
|
||||||
fs.size,
|
fs.size,
|
||||||
fs.weighed,
|
fs.weighed,
|
||||||
fs.case_pack,
|
fs.case_pack,
|
||||||
fs.department.with_renderer(products_forms.DepartmentFieldRenderer),
|
fs.department,
|
||||||
fs.subdepartment.with_renderer(products_forms.SubdepartmentFieldRenderer),
|
fs.subdepartment,
|
||||||
fs.category.with_renderer(products_forms.CategoryFieldRenderer),
|
fs.category,
|
||||||
fs.family,
|
fs.family,
|
||||||
fs.report_code,
|
fs.report_code,
|
||||||
fs.regular_price,
|
fs.regular_price,
|
||||||
|
|
Loading…
Reference in a new issue