Fix (hack) for editing some department flags
not sure why this is necessary, but not very important for now...
This commit is contained in:
parent
a8c8447297
commit
3861d46ce3
|
@ -30,6 +30,8 @@ import six
|
|||
|
||||
from rattail.db import model
|
||||
|
||||
from deform import widget as dfwidget
|
||||
|
||||
from tailbone import grids
|
||||
from tailbone.views import MasterView3 as MasterView, AutocompleteView
|
||||
|
||||
|
@ -62,8 +64,14 @@ class DepartmentsView(MasterView):
|
|||
super(DepartmentsView, self).configure_form(f)
|
||||
f.remove_field('subdepartments')
|
||||
f.remove_field('employees')
|
||||
|
||||
# TODO: widget should not be necessary, per type
|
||||
f.set_type('product', 'boolean')
|
||||
f.set_widget('product', dfwidget.CheckboxWidget())
|
||||
|
||||
# TODO: widget should not be necessary, per type
|
||||
f.set_type('personnel', 'boolean')
|
||||
f.set_widget('personnel', dfwidget.CheckboxWidget())
|
||||
|
||||
def template_kwargs_view(self, **kwargs):
|
||||
department = kwargs['instance']
|
||||
|
|
Loading…
Reference in a new issue