本文整理汇总了Python中stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter.export方法的典型用法代码示例。如果您正苦于以下问题:Python SpreadSheetExporter.export方法的具体用法?Python SpreadSheetExporter.export怎么用?Python SpreadSheetExporter.export使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter
的用法示例。
在下文中一共展示了SpreadSheetExporter.export方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: export_spreadsheet_activate
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def export_spreadsheet_activate(self):
"""Called when the Export menu item is activated"""
if self.search_spec is None:
raise NotImplementedError
sse = SpreadSheetExporter()
sse.export(object_list=self.results, name=self.app_name, filename_prefix=self.app_name)
示例2: _export_spreadsheet
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def _export_spreadsheet(self):
"""Runs a dialog to export the current search results to a CSV file.
"""
if self._is_accounts_tab():
run_dialog(FinancialReportDialog, self, self.store)
else:
page = self.get_current_page()
sse = SpreadSheetExporter()
sse.export(object_list=page.result_view,
name=self.app_title,
filename_prefix=self.app_name)
示例3: export_spreadsheet_activate
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def export_spreadsheet_activate(self):
"""Called when the Export menu item is activated"""
if self.search_spec is None:
raise NotImplementedError
model = self.results.get_model()
if isinstance(model, LazyObjectModel):
model.load_items_from_results(0, model._count)
sse = SpreadSheetExporter()
sse.export(object_list=self.results, name=self.app_name, filename_prefix=self.app_name)
示例4: export_spreadsheet_activate
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def export_spreadsheet_activate(self):
"""Called when the Export menu item is activated"""
if self.search_spec is None:
raise NotImplementedError
if api.sysparam.get_bool('SMART_LIST_LOADING'):
model = self.results.get_model()
model.load_items_from_results(0, model._count)
sse = SpreadSheetExporter()
sse.export(object_list=self.results,
name=self.app_name,
filename_prefix=self.app_name)
示例5: _on_export_csv_button__clicked
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def _on_export_csv_button__clicked(self, widget):
if not self.unlimited_results:
executer = self.search.get_query_executer()
data = executer.search(limit=-1)
else:
# The results are already unlimited, let the exporter get the data
# from the objectlist
data = None
sse = SpreadSheetExporter()
sse.export(object_list=self.results,
data=data,
name=self._csv_name,
filename_prefix=self._csv_prefix)
示例6: _on_export_csv_button__clicked
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def _on_export_csv_button__clicked(self, widget):
if not self.unlimited_results:
# FIXME: This is making the filters set by the user be respected
# when exporting the results.
executer = self.search.get_query_executer()
states = [(sf.get_state()) for sf in self.search.get_search_filters()]
data = executer.search(states, limit=-1)
else:
# The results are already unlimited, let the exporter get the data
# from the objectlist
data = None
sse = SpreadSheetExporter()
sse.export(object_list=self.results,
data=data,
name=self._csv_name,
filename_prefix=self._csv_prefix)
示例7: _export_csv
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def _export_csv(self):
sse = SpreadSheetExporter()
sse.export(object_list=self.ordered_items,
name=_('Purchase items'),
filename_prefix=_('purchase-items'))
示例8: _on_export_csv_button__clicked
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def _on_export_csv_button__clicked(self, widget):
sse = SpreadSheetExporter()
sse.export(object_list=self.results,
name=_('Calls'),
filename_prefix=_('calls'))
示例9: _export_csv
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def _export_csv(self, object_list, name, filename_prefix):
sse = SpreadSheetExporter()
sse.export(object_list=object_list,
name=name,
filename_prefix=filename_prefix)
示例10: on_export_button__clicked
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def on_export_button__clicked(self, button):
sse = SpreadSheetExporter()
sse.export(object_list=self.items_list,
name=_('Purchase items'),
filename_prefix=_('purchase-items'))
示例11: _on_export_csv_button__clicked
# 需要导入模块: from stoqlib.gui.dialogs.spreadsheetexporterdialog import SpreadSheetExporter [as 别名]
# 或者: from stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter import export [as 别名]
def _on_export_csv_button__clicked(self, widget):
sse = SpreadSheetExporter()
sse.export(object_list=self.results, name=_("Fiscal book"), filename_prefix=_("fiscal-book"))