Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • E-learning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Sociale media-marketing
    • E-mailmarketing
    • Sms-marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Artificiële Intelligentie
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelwinkel
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Horeca & Hospitality
    • Bar en café
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van mede-eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brouwerij
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Diensten
    • Klusjesman
    • IT-hardware & ondersteuning
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Alle bedrijfstakken bekijken
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijsprogramma
    • Scale Up! Business Game
    • Odoo bezoeken
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Partner worden
    • Diensten voor partners
    • Registreer je accountantskantoor
    • Referral Program
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Use of QR Codes and Barcodes in PDF's

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
pdfreportsqrcode
1 Beantwoorden
1218 Weergaven
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
Annuleer
Avatar
Ian Gennaro Guitron Sagaon (iggs)
Auteur Beste antwoord

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
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
PDF report name isn't respected when using module from app store
pdf reports
Avatar
0
sep. 21
5050
PDF reports show negative amounts with vertical bar "|" instead of "-". How can I fix this.?
pdf reports
Avatar
Avatar
1
mei 18
5920
No css format on PDF reports after upgrade Odoo Server 10.0-20170119 ! (no headers) Opgelost
pdf reports
Avatar
Avatar
2
jan. 17
8934
Reports not auto-saved to attachments Opgelost
pdf reports
Avatar
Avatar
Avatar
3
mrt. 15
9714
Add Customer Name to Printed Reports Name Opgelost
pdf reports 17.2
Avatar
Avatar
Avatar
2
okt. 24
4350
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Partner worden
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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