Refactor views to use Grid.set_sort_defaults() method

This commit is contained in:
Lance Edgar 2017-12-04 22:40:10 -06:00
parent 7d79727c2e
commit 4902fab187
36 changed files with 42 additions and 59 deletions

View file

@ -220,7 +220,7 @@ class ProductsView(MasterView):
g.set_sorter('current_price', self.CurrentPrice.price)
g.set_filter('current_price', self.CurrentPrice.price, label="Current Price")
g.default_sortkey = 'upc'
g.set_sort_defaults('upc')
if self.print_labels and self.request.has_perm('products.print_labels'):
g.more_actions.append(grids.GridAction('print_label', icon='print'))