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
    • Información
    • 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
    Food & Hospitality
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Guest House
    • Distribuidor de bebidas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consulting
    • Accounting Firm
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Trades
    • Handyman
    • Hardware y asistencia informática
    • Solar Energy Systems
    • Zapatero
    • Servicios de limpieza
    • HVAC Services
    Others
    • Nonprofit Organization
    • 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

print product barcode on label

Suscribirse

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

Se marcó esta pregunta
productbarcodelabel6.1
2 Respuestas
16111 Vistas
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
Descartar
Avatar
Lluís
Autor Mejor respuesta

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
Descartar
Avatar
mmycool
Mejor respuesta

Is the Label module module available on V.7?

0
Avatar
Descartar
Lluís
Autor

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

¿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
Print product label
product barcode label
Avatar
0
mar 15
4469
Modify ZPL label coding. Resuelto
barcode label
Avatar
Avatar
1
mar 25
5764
Removing Barcode Resuelto
product barcode
Avatar
Avatar
Avatar
3
jul 21
5141
How to display variant price in the product label instead of base price
product label
Avatar
0
mar 16
3899
openerp -7 Unique barcode generation for-product instance
product barcode
Avatar
Avatar
1
mar 15
4222
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