Tweak how family data is displayed
This commit is contained in:
parent
129455a31f
commit
a49aa77ec0
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -54,12 +54,8 @@ class FamilyView(MasterView):
|
|||
has_rows = True
|
||||
model_row_class = model.Product
|
||||
|
||||
row_labels = {
|
||||
'upc': "UPC",
|
||||
}
|
||||
|
||||
row_grid_columns = [
|
||||
'upc',
|
||||
'_product_key_',
|
||||
'brand',
|
||||
'description',
|
||||
'size',
|
||||
|
@ -94,7 +90,9 @@ class FamilyView(MasterView):
|
|||
g.set_renderer('regular_price', self.render_price)
|
||||
g.set_renderer('current_price', self.render_price)
|
||||
|
||||
g.set_sort_defaults('upc')
|
||||
key = self.rattail_config.product_key()
|
||||
field = self.product_key_fields.get(key, key)
|
||||
g.set_sort_defaults(field)
|
||||
|
||||
def render_price(self, product, field):
|
||||
if not product.not_for_sale:
|
||||
|
|
|
@ -180,7 +180,9 @@ class MasterView(View):
|
|||
rows_downloadable_csv = False
|
||||
rows_downloadable_xlsx = False
|
||||
|
||||
row_labels = {}
|
||||
row_labels = {
|
||||
'upc': "UPC",
|
||||
}
|
||||
|
||||
@property
|
||||
def Session(self):
|
||||
|
|
|
@ -900,7 +900,7 @@ class ProductView(MasterView):
|
|||
f.set_label('family_uuid', "Family")
|
||||
else:
|
||||
f.set_readonly('family')
|
||||
# f.set_renderer('family', self.render_family)
|
||||
f.set_renderer('family', self.render_family)
|
||||
|
||||
# report_code
|
||||
if self.creating or self.editing:
|
||||
|
|
Loading…
Reference in a new issue