本文整理汇总了Python中stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter类的典型用法代码示例。如果您正苦于以下问题:Python SpreadSheetExporter类的具体用法?Python SpreadSheetExporter怎么用?Python SpreadSheetExporter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SpreadSheetExporter类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: export_spreadsheet_activate
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)
开发者ID:rg3915,项目名称:stoq,代码行数:7,代码来源:shellapp.py
示例2: _export_spreadsheet
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)
开发者ID:leandrorchaves,项目名称:stoq,代码行数:11,代码来源:financial.py
示例3: export_spreadsheet_activate
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)
开发者ID:amaurihamasu,项目名称:stoq,代码行数:11,代码来源:shellapp.py
示例4: export_spreadsheet_activate
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)
开发者ID:pkaislan,项目名称:stoq,代码行数:13,代码来源:shellapp.py
示例5: _on_export_csv_button__clicked
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)
开发者ID:Guillon88,项目名称:stoq,代码行数:14,代码来源:searchdialog.py
示例6: _on_export_csv_button__clicked
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)
开发者ID:hackedbellini,项目名称:stoq,代码行数:17,代码来源:searchdialog.py
示例7: confirm
def confirm(self):
start = self.date_filter.get_start_date()
if start is None:
warning(_("There are no transactions yet"))
return
f = FinancialIntervalReport(self.store, start.year)
if not f.run():
return
temporary = tempfile.NamedTemporaryFile(
# Translators: This will be part of a filename
prefix=_('stoq-yearly-report'),
suffix='.xls', delete=False)
f.write(temporary)
sse = SpreadSheetExporter()
sse.export_temporary(temporary)
self.close()
开发者ID:marianaanselmo,项目名称:stoq,代码行数:18,代码来源:financialreportdialog.py
示例8: _export_csv
def _export_csv(self):
sse = SpreadSheetExporter()
sse.export(object_list=self.ordered_items,
name=_('Purchase items'),
filename_prefix=_('purchase-items'))
开发者ID:LeonamSilva,项目名称:stoq,代码行数:5,代码来源:purchasedetails.py
示例9: _on_export_csv_button__clicked
def _on_export_csv_button__clicked(self, widget):
sse = SpreadSheetExporter()
sse.export(object_list=self.results,
name=_('Calls'),
filename_prefix=_('calls'))
开发者ID:romaia,项目名称:stoq,代码行数:5,代码来源:callsearch.py
示例10: _export_csv
def _export_csv(self, object_list, name, filename_prefix):
sse = SpreadSheetExporter()
sse.export(object_list=object_list,
name=name,
filename_prefix=filename_prefix)
开发者ID:hackedbellini,项目名称:stoq,代码行数:5,代码来源:purchasedetails.py
示例11: on_export_button__clicked
def on_export_button__clicked(self, button):
sse = SpreadSheetExporter()
sse.export(object_list=self.items_list,
name=_('Purchase items'),
filename_prefix=_('purchase-items'))
开发者ID:hackedbellini,项目名称:stoq,代码行数:5,代码来源:inventorydetails.py
示例12: _on_export_csv_button__clicked
def _on_export_csv_button__clicked(self, widget):
sse = SpreadSheetExporter()
sse.export(object_list=self.results, name=_("Fiscal book"), filename_prefix=_("fiscal-book"))
开发者ID:rg3915,项目名称:stoq,代码行数:3,代码来源:fiscalsearch.py
注:本文中的stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论