Add unit_of_measure to product detail view.

This commit is contained in:
Lance Edgar 2015-02-26 21:10:08 -06:00
parent d50aef4e49
commit 6ea032c591

View file

@ -37,9 +37,11 @@ from webhelpers.html.tags import link_to
from pyramid.httpexceptions import HTTPFound
from pyramid.renderers import render_to_response
from . import SearchableAlchemyGridView
from tailbone.views import SearchableAlchemyGridView
from tailbone.forms import EnumFieldRenderer
import rattail.labels
from rattail import enum
from rattail import sil
from rattail import batches
from rattail.threads import Thread
@ -269,6 +271,7 @@ class ProductCrud(CrudView):
fs = self.make_fieldset(model)
fs.upc.set(renderer=GPCFieldRenderer)
fs.brand.set(options=[])
fs.unit_of_measure.set(renderer=EnumFieldRenderer(enum.UNIT_OF_MEASURE))
fs.regular_price.set(renderer=PriceFieldRenderer)
fs.current_price.set(renderer=PriceFieldRenderer)
fs.configure(
@ -277,6 +280,7 @@ class ProductCrud(CrudView):
fs.brand.with_renderer(BrandFieldRenderer),
fs.description,
fs.size,
fs.unit_of_measure.label("Unit of Measure"),
fs.case_pack,
fs.department,
fs.subdepartment,