Convert subdepartments view to master3
This commit is contained in:
parent
bbfa15845a
commit
0d144ff58b
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue