Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Conocimientos
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyecto
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

create pdf and save as

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
pdfreportlab
7656 Vistas
Avatar
walid

Hello, I managed to create a pdf file that contains a histogram, which is stored on the server. my problem is: I want to display the window "save as" in the browser to give customers the possibility to save the file locally and I do not know how

please help me

import string

from reportlab.lib.styles import getSampleStyleSheet from reportlab.lib.units import cm from reportlab.graphics.charts.barcharts import VerticalBarChart from reportlab.graphics.shapes import Drawing from reportlab.platypus import * from reportlab.lib import colors

elements = [] styles = getSampleStyleSheet() doc = SimpleDocTemplate('C:/nombre_panne.pdf')

    elements.append(box(Paragraph("Nombre de pannes",styles['Title'])))

    # A Spacer, fairly intuitively, occupies a certain amount of Space
    # in the document.
    elements.append(Spacer(0, 0.5 * cm))

    # Create a chart 'Drawing'
    chart = VerticalBarChart()

    # Set the starting point to be (0, 0).  Changing this value changes
    # the position that the chart is rendered at within it's 'Drawing'
    # space, which we create below.
    chart.x = 0
    chart.y = 0

    # This determines the width, in centimeters (you could use 'inch'
    # as well) of the chart on the paper, as well as the height.
    chart_width = 8*cm
    chart_height = 3*cm

    chart.height = chart_height
    chart.width = chart_width

    # The vertical ticks will be labeled from 0 with a value every
    # 15 units, spaced so that the maximum value is 60.
    chart.valueAxis.valueMin = 0
    chart.valueAxis.valueMax = 60
    chart.valueAxis.valueStep = 15

    # Put the labels at the bottom with an interval of 8 units,
    # -2 units below the axis, rotated 30 degrees from horizontal
    chart.categoryAxis.labels.dx = 8
    chart.categoryAxis.labels.dy = -2
    chart.categoryAxis.labels.angle = 30 

    # The text box's NE corner (top right) is located at the above
    # coordinate
    chart.categoryAxis.labels.boxAnchor = 'ne'

    # Our various horizontal axis labels
    catNames = ['Jan-06', 'Feb-06', 'Mar-06', 'Apr-06', 'May-06','Jun-06', 'Jul-06', 'Aug-06']
    chart.categoryAxis.categoryNames = catNames

    # Some random data to populate the chart with.
    chart.data = [(8, 5, 20, 22, 37, 28, 30, 47)]

    # Since the 'Chart' class itself isn't a 'Flowable', we need to
    # create a 'Drawing' flowable to contain it.  We want the basic
    # area to be the same size as the chart itself, so we will
    # initialize it with the chart's size.
    drawing = Drawing(chart_width, chart_height)
    drawing.add(chart)

    # Add the Chart containing Drawing to our elements list
    elements.append(box(drawing))

    elements.append(Spacer(0, 2 * cm))

    # Write the document to disk
    doc.build(elements)
0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Quote Builder With Custom Rental Report (Studio)
pdf
Avatar
0
oct 25
583
Quote Builder With Custom Rental Report (Studio)
pdf
Avatar
0
oct 25
4
How to edit the header of the quote template Resuelto
pdf
Avatar
Avatar
Avatar
2
ago 25
1382
Customize Report problem Resuelto
pdf
Avatar
Avatar
Avatar
3
ago 25
1695
How to Edit Out the Blank Space in the Quote/Order Confirmation PDFs? Resuelto
pdf
Avatar
Avatar
Avatar
Avatar
3
ago 25
2817
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now