Don't use multi-select for new report in buefy themes
also let app handler fetch the report handler
This commit is contained in:
parent
03dad82663
commit
b9037111a4
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -36,7 +36,6 @@ import rattail
|
|||
from rattail.db import model, Session as RattailSession
|
||||
from rattail.files import resource_path
|
||||
from rattail.time import localtime
|
||||
from rattail.reporting import get_report_handler
|
||||
from rattail.threads import Thread
|
||||
from rattail.util import simple_error, OrderedDict
|
||||
|
||||
|
@ -286,7 +285,8 @@ class GenerateReport(View):
|
|||
self.handler = self.get_handler()
|
||||
|
||||
def get_handler(self):
|
||||
return get_report_handler(self.rattail_config)
|
||||
app = self.get_rattail_app()
|
||||
return app.get_report_handler()
|
||||
|
||||
def choose(self):
|
||||
"""
|
||||
|
@ -313,7 +313,7 @@ class GenerateReport(View):
|
|||
values = [(r.type_key, r.name) for r in reports.values()]
|
||||
values.sort(key=lambda r: r[1])
|
||||
if use_buefy:
|
||||
form.set_widget('report_type', forms.widgets.CustomSelectWidget(values=values, size=10))
|
||||
form.set_widget('report_type', forms.widgets.CustomSelectWidget(values=values))
|
||||
form.widgets['report_type'].set_template_values(input_handler='reportTypeChanged')
|
||||
else:
|
||||
form.set_widget('report_type', forms.widgets.PlainSelectWidget(values=values, size=10))
|
||||
|
|
Loading…
Reference in a new issue