Add product and personnel flags for Department

This commit is contained in:
Lance Edgar 2017-10-30 20:52:07 -07:00
parent 3f335315ab
commit c320ab2feb

View file

@ -44,6 +44,8 @@ class DepartmentsView(MasterView):
grid_columns = [
'number',
'name',
'product',
'personnel',
]
def configure_grid(self, g):
@ -51,6 +53,8 @@ class DepartmentsView(MasterView):
g.filters['name'].default_active = True
g.filters['name'].default_verb = 'contains'
g.default_sortkey = 'number'
g.set_type('product', 'boolean')
g.set_type('personnel', 'boolean')
g.set_link('number')
g.set_link('name')
@ -58,6 +62,8 @@ class DepartmentsView(MasterView):
super(DepartmentsView, self).configure_form(f)
f.remove_field('subdepartments')
f.remove_field('employees')
f.set_type('product', 'boolean')
f.set_type('personnel', 'boolean')
def template_kwargs_view(self, **kwargs):
department = kwargs['instance']