From 3861d46ce30ff4bdccff7416e9caed3e2c2d3358 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 18 Nov 2017 22:34:43 -0600 Subject: [PATCH] Fix (hack) for editing some department flags not sure why this is necessary, but not very important for now... --- tailbone/views/departments.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tailbone/views/departments.py b/tailbone/views/departments.py index 85ac36a1..db1d633c 100644 --- a/tailbone/views/departments.py +++ b/tailbone/views/departments.py @@ -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']