diff --git a/tailbone/views/categories.py b/tailbone/views/categories.py index bfb2b1c7..49f1d30d 100644 --- a/tailbone/views/categories.py +++ b/tailbone/views/categories.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2015 Lance Edgar +# Copyright © 2010-2016 Lance Edgar # # This file is part of Rattail. # @@ -43,9 +43,10 @@ class CategoriesView(MasterView): def configure_grid(self, g): g.filters['name'].default_active = True g.filters['name'].default_verb = 'contains' - g.default_sortkey = 'number' + g.default_sortkey = 'code' g.configure( include=[ + g.code, g.number, g.name, g.department, @@ -55,6 +56,7 @@ class CategoriesView(MasterView): def configure_fieldset(self, fs): fs.configure( include=[ + fs.code, fs.number, fs.name, fs.department, diff --git a/tailbone/views/master.py b/tailbone/views/master.py index cb21e00a..04aacf5d 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -620,6 +620,7 @@ class MasterView(View): Returns the unique key to be used for the grid, for caching sort/filter options etc. """ + # TODO: default here should probably come from route_prefix instead? return getattr(cls, 'grid_key', '{0}s'.format(cls.get_normalized_model_name())) def make_grid_kwargs(self, **kwargs):