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 rattail.db import model
|
||||||
|
|
||||||
from tailbone.db import Session
|
from tailbone.db import Session
|
||||||
from tailbone.views import MasterView2 as MasterView
|
from tailbone.views import MasterView3 as MasterView
|
||||||
|
|
||||||
|
|
||||||
class SubdepartmentsView(MasterView):
|
class SubdepartmentsView(MasterView):
|
||||||
|
@ -61,15 +61,16 @@ class SubdepartmentsView(MasterView):
|
||||||
g.filters['name'].default_active = True
|
g.filters['name'].default_active = True
|
||||||
g.filters['name'].default_verb = 'contains'
|
g.filters['name'].default_verb = 'contains'
|
||||||
g.default_sortkey = 'name'
|
g.default_sortkey = 'name'
|
||||||
|
g.set_link('number')
|
||||||
|
g.set_link('name')
|
||||||
|
|
||||||
def configure_fieldset(self, fs):
|
def configure_form(self, f):
|
||||||
fs.configure(
|
super(SubdepartmentsView, self).configure_form(f)
|
||||||
include=[
|
f.remove_field('products')
|
||||||
fs.number,
|
|
||||||
fs.name,
|
# TODO: figure out this dang department situation..
|
||||||
fs.department,
|
f.remove_field('department_uuid')
|
||||||
])
|
f.set_readonly('department')
|
||||||
return fs
|
|
||||||
|
|
||||||
def get_merge_data(self, subdept):
|
def get_merge_data(self, subdept):
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue