def print_sell_registry(self): d = Printer() doc = d.sell_registry() response.headers["Content-type"] = "application/vnd.ms-excel" response.headers["Content-disposition"] = "attachment; filename=%s" % "rejestr_sprzedazy.xls" content = doc.getvalue() response.headers["Content-Length"] = str(len(content)) doc.close() return content
def print_export_companies(self): d = Printer() doc = d.export_companies() response.headers["Content-type"] = "text/xml; charset='utf-8'" response.headers["Content-disposition"] = "attachment; filename=%s" % "kontrahenci.xml" content = doc.getvalue() response.headers["Content-Length"] = str(len(content)) doc.close() return content
def print_export_invoices(self): d = Printer() date_from = request.params.get("from") date_to = request.params.get("to") doc = d.export_to_cdn(date_from, date_to) response.headers["Content-type"] = "text/xml; charset='utf-8'" response.headers["Content-disposition"] = "attachment; filename=%s" % "faktury.xml" content = doc.getvalue() response.headers["Content-Length"] = str(len(content)) doc.close() return content