Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Discuss
    • Kecerdasan Buatan
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Manajemen Properti
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    • Referral Program
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Konsultasi
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Use of QR Codes and Barcodes in PDF's

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
pdfreportsqrcode
1 Balas
1216 Tampilan
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
Buang
Avatar
Ian Gennaro Guitron Sagaon (iggs)
Penulis Jawaban Terbai

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
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
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
5919
No css format on PDF reports after upgrade Odoo Server 10.0-20170119 ! (no headers) Diselesaikan
pdf reports
Avatar
Avatar
2
Jan 17
8932
Reports not auto-saved to attachments Diselesaikan
pdf reports
Avatar
Avatar
Avatar
3
Mar 15
9714
Add Customer Name to Printed Reports Name Diselesaikan
pdf reports 17.2
Avatar
Avatar
Avatar
2
Okt 24
4350
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Karir
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah software terintegrasi dengan 70+ aplikasi seperti CRM, Akuntansi, Inventaris, Sales, eCommerce, Marketing, POS; plus fitur lokal Indonesia!

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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