Add unit item and pack size fields to product view

This commit is contained in:
Lance Edgar 2017-03-25 15:28:38 -05:00
parent 4a2f329613
commit 77a252399b
2 changed files with 7 additions and 1 deletions

View file

@ -80,6 +80,8 @@
${render_field_readonly(form.fieldset.size)}
${render_field_readonly(form.fieldset.unit_size)}
${render_field_readonly(form.fieldset.unit_of_measure)}
${render_field_readonly(form.fieldset.unit)}
${render_field_readonly(form.fieldset.pack_size)}
${render_field_readonly(form.fieldset.case_size)}
${self.extra_main_fields(form)}
</%def>

View file

@ -284,6 +284,8 @@ class ProductsView(MasterView):
fs.unit_size.set(renderer=forms.renderers.QuantityFieldRenderer)
fs.unit_of_measure.set(label="Unit of Measure",
renderer=forms.renderers.EnumFieldRenderer(self.enum.UNIT_OF_MEASURE))
fs.unit.set(renderer=forms.renderers.ProductFieldRenderer, label="Unit Item")
fs.pack_size.set(renderer=forms.renderers.QuantityFieldRenderer)
fs.regular_price.set(renderer=forms.renderers.PriceFieldRenderer, readonly=True)
fs.current_price.set(renderer=forms.renderers.PriceFieldRenderer, readonly=True)
fs.last_sold.set(readonly=True)
@ -299,8 +301,10 @@ class ProductsView(MasterView):
fs.unit_size,
fs.unit_of_measure,
fs.size,
fs.weighed,
fs.unit,
fs.pack_size,
fs.case_size,
fs.weighed,
fs.department,
fs.subdepartment,
fs.category,