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
    Rantai Pasokan
    • 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
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-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
    • Estate Management
    • 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.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
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

print product barcode on label

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
productbarcodelabel6.1
2 Replies
16131 Tampilan
Avatar
Lluís

I want to print barcode with Label module, on OpenERP 6.1

I go to "settings -> customization -> Labels -> Label templates" and I edit one of the templates. To print barcode I tried:

  • first, a harcoded code

    <barcode x="1cm" y="1cm" height="1cm" code="EAN13">7501031311309</barcode>

  • second, I tried with ${object.ean13}:

    <barcode x="1cm" y="1cm" height="1cm" code="EAN13">${object.ean13}</barcode>

  • finally on 3 lines:

    <barcode x="1cm" y="1cm" height="1cm" code="EAN13">

    ${object.ean13}

    </barcode>

the first works, but always the same barcode, obviously.

the second I get:

Illegal assignment of '${object.ean' to 'value' in class Ean13BarcodeWidget

(<type 'exceptions.AttributeError'>, AttributeError("Illegal assignment of '${object.ean' to 'value' in class Ean13BarcodeWidget",), <traceback object at 0xe0c9784>)

and the third:

Illegal assignment of '<para style=' to 'value' in class Ean13BarcodeWidget

(<type 'exceptions.AttributeError'>, AttributeError("Illegal assignment of '<para style=' to 'value' in class Ean13BarcodeWidget",), <traceback object at 0xccb9554>)

How I should configure the barcode tag to get ean13 from each product?

0
Avatar
Buang
Avatar
Lluís
Penulis Jawaban Terbai

had to change label module:

diff --git a/openerp/addons_extra/label/label_report_engine.py b/openerp/addons_extra/label/label_report_engine.py
index b1419d6..edce844 100644
--- a/openerp/addons_extra/label/label_report_engine.py
+++ b/openerp/addons_extra/label/label_report_engine.py
@@ -211,7 +211,11 @@ class report_label_xsl(report_rml):
                 if text_line: # Line that includes text o fields to print
                     rline = re.sub(r'(<([\w/]+)\s*[^>]*>)', r'</xsl:text>\1<xsl:text>', line) # To put <...> report tags outside <xsl:text>...</xsl:text>
                     rline = re.sub(r'\$\{([\w\.]+)\s*[^}]*\}', r'</xsl:text><xsl:value-of select="\1"/><xsl:text>', rline)
-                    rline = '    <para style="nospace"><xsl:text>%s</xsl:text></para>\n' % rline
+                    # barCode expects it's value without <para> tags
+                    if re.search(r'object\.ean13', line):
+                        rline = '<xsl:text>%s</xsl:text>\n' % rline
+                    else:
+                        rline = '    <para style="nospace"><xsl:text>%s</xsl:text></para>\n' % rline
                     tline = re.sub(r'(<[^>]*>)', '', line) # To exclude <...> tags
                     tline = re.sub(r'(\$\{([\w\.]+)\s*[^}]*\})', r'<\2>\1</\2>', tline)
                 else: # Line that only includes report tags like <tr>, <td>, <blockTable>, <nextFrame/>, ... to control the report format

and use barCode like in the 3rd example

<barcode x="1cm" y="1cm" height="1cm" code="EAN13">
${object.ean13}
</barcode>

do not insert spaces at the beginning of lines

0
Avatar
Buang
Avatar
mmycool
Jawaban Terbai

Is the Label module module available on V.7?

0
Avatar
Buang
Lluís
Penulis

I have no idea, still working on 6.1, you should check at launchpad

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
Print product label
product barcode label
Avatar
0
Mar 15
4488
Modify ZPL label coding. Diselesaikan
barcode label
Avatar
Avatar
1
Mar 25
5857
Removing Barcode Diselesaikan
product barcode
Avatar
Avatar
Avatar
3
Jul 21
5195
How to display variant price in the product label instead of base price
product label
Avatar
0
Mar 16
3962
openerp -7 Unique barcode generation for-product instance
product barcode
Avatar
Avatar
1
Mar 15
4278
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
  • Tugas
  • 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 ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

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