Ir al contenido
Odoo Menú
  • Iniciar sesión
  • 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
    • e-learning
    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
    • Inteligencia artificial
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Sectores
    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 pub
    • 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
    • Asesoría contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Cervecería
    • Regalos corporativos
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Oficios
    • Servicios de mantenimiento
    • Hardware y soporte técnico
    • 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 vallas publicitarias
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Explorar todos los sectores
  • 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
    • Servicios para partners
    • Registrar tu asesoría contable
    • Referral Program
    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
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Sobre este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Sobre este foro
Ayuda

Use of QR Codes and Barcodes in PDF's

Suscribirse

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

Esta pregunta ha sido marcada
pdfreportsqrcode
1 Responder
1241 Vistas
Avatar
Ian Gennaro Guitron Sagaon (iggs)

Hello community, does anyone knows if Odoo has a way to use QR codes in PDF documents? I need to use generate some information in my QR code related to data in the PDF.

0
Avatar
Descartar
Avatar
Ian Gennaro Guitron Sagaon (iggs)
Autor Mejor respuesta

Odoo allows the creation of a QR-type image that is fed with information from the database (dynamic fields), similar to how we fill a PDF document with various dynamic fields. To achieve this, we will use the Studio application and the PDF editor (specifically the “QWeb”). Follow these steps:

  • Access the PDF report you want to edit using Studio (for this example, we will use a new document).





  • Once the new document or the document to edit is ready, use the "</> Edit Sources" function.



  • Now we will insert code to create the QR image we need:

  • 💡

    Remember that when inserting elements, we must follow best practices by using the web.studio view and the corresponding xpath.


  • <img t-att-src="'/report/barcode/QR/%s' % (doc.partner_id.name)"/>

This code is represented as follows:

  • With the code written, you will be able to see the QR code information, but not in the desired format. To fix this, use the following extension:
  • <img t-att-src="'/report/barcode/QR/%s' % (doc.partner_id.name)" style="width:120px;height:120px"/>

  • The result of the code is the next one:


  • If you need to include more information, you must use connectors within the parentheses of the code.

    • Use the connector "+" to add more fields.
    • You can keep adding as many fields as needed.
✅

PRO TIP:

Remember to keep simple the information, when using more than 200 characters the QR becomes difficult to be read. If you need to use more than this amount of characters, we recommend to use a link to access the information from the QR.



  • When scanned, the result will be:



  • If you want the information to appear separated, you can include separators within the code to improve readability.


  • Quotation marks allow you to define spaces, separators, or text characters. The result will look like this:



  • ⚠️
    If an error appears when saving the information: 
    Add spaces between elements inside single quotes 
    Example: ' / ', ' Folio ', etc.
  • Once all elements and fields have been configured, you can finish editing the document, and it will update according to the information entered in the system.
❌
It is very important that when implementing these configurations, we remind that there are laws and regulations protecting personal data, which is considered restricted.

Some examples of this are: SSN, RFC, internal ID's, personal emails, bank accounts and more. 

For more information, visit: Personal and Sensitive Information

BARCODES

For barcodes, the process is similar. However, keep in mind:

  • Barcodes can only store a single alphanumeric value (as in the Inventory application).
💡
There are several types of barcodes, the common ones are the next ones:
  • CODE128 (most common in Odoo) [USE THIS FOR DOCUMENTS]

    • Flexible (Complete ASCII)
    • 20 - 30 characters (optimal length)
  • EAN13

    • 13 characters
    • For retail products
  • CODE39

    • A-Z, 0-9, and some symbols
    • If is more 

To insert a barcode into a PDF document, follow the same steps but use the following code:

<div t-field="doc.name" t-options="{'widget': 'barcode', 'width': 400, 'height': 100}"/>

It is a text field rendered visually as a barcode using a widget.

💡
It could also be done as: 

<img t-att-src="'/report/barcode/Code128/%s' % doc.name"/>

The final result will look like this:

GENERAL RECOMMENDATIONS

Next, here are some recommendations to take in consideration about using this tipe of functions in Odoo:

  • The recommended minimal size to use is:

    • QR: 2x2 cm [Ideal= 3 - 4cm]
    • Barcode: height = 1 cm [quiet zone is mandatory]
  • When positioning the QR or Barcode is important to avoid borders of the document and fold areas (if printed).
  • Try to keep a good contrast to help the lecture of the code (white background and solid black text).
⚠️
REMEMBER TO TEST THE CODE: Print it, scan it with several devices and test different sizes to confirm that the information works.

More information

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
PDF report name isn't respected when using module from app store
pdf reports
Avatar
0
sept 21
5060
PDF reports show negative amounts with vertical bar "|" instead of "-". How can I fix this.?
pdf reports
Avatar
Avatar
1
may 18
5927
No css format on PDF reports after upgrade Odoo Server 10.0-20170119 ! (no headers) Resuelto
pdf reports
Avatar
Avatar
2
ene 17
8955
Reports not auto-saved to attachments Resuelto
pdf reports
Avatar
Avatar
Avatar
3
mar 15
9734
Add Customer Name to Printed Reports Name Resuelto
pdf reports 17.2
Avatar
Avatar
Avatar
2
oct 24
4366
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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones empresariales de código abierto que cubre 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 estar 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