diff --git a/tailbone/views/subdepartments.py b/tailbone/views/subdepartments.py index 214c33f6..c6bf449c 100644 --- a/tailbone/views/subdepartments.py +++ b/tailbone/views/subdepartments.py @@ -29,7 +29,7 @@ from __future__ import unicode_literals, absolute_import from rattail.db import model from tailbone.db import Session -from tailbone.views import MasterView2 as MasterView +from tailbone.views import MasterView3 as MasterView class SubdepartmentsView(MasterView): @@ -61,15 +61,16 @@ class SubdepartmentsView(MasterView): g.filters['name'].default_active = True g.filters['name'].default_verb = 'contains' g.default_sortkey = 'name' + g.set_link('number') + g.set_link('name') - def configure_fieldset(self, fs): - fs.configure( - include=[ - fs.number, - fs.name, - fs.department, - ]) - return fs + def configure_form(self, f): + super(SubdepartmentsView, self).configure_form(f) + f.remove_field('products') + + # TODO: figure out this dang department situation.. + f.remove_field('department_uuid') + f.set_readonly('department') def get_merge_data(self, subdept): return {