Webkit Report Barcode

Adds a barcode helper to webkit reports

Technical Name:
report_webkit_barcode
License:
Author:
Savoir-faire Linux
https://odoo-community.org/web/image/product.template/2197/image_1920?unique=a9f4081
  • Odoo Version

Terms and Conditions 

Add barcodes in webkit reports

Usage

To embed a barcode image in a webkit report, use ${helper.barcode(value)}. Depending on template filtering, you might need to force not to use any filter by doing ${helper.barcode(value) | u}

The function is defined as:
barcode(value, code='Code128', drawOpts=None, htmlAttrs=None)

Parameters

value
Value for barcode as expected by barcode type. Code128 takes a number or numeric string
code
barcode type. ReportLab 2.5 has the following codes: Codabar, Code11, Code128, EAN13, EAN8, Extended39, Extended93, FIM, I2of5, MSI, POSTNET, QR, Standard39, Standard93, USPS_4State
drawOpts
dictionary of options for reportlab graphic. Depends on barcode type. Use format to specify image format (default png), width to specify image width in pixels (int), height to specify image height in pixels (int)
htmlAttrs
dictionary of html attributes

Requirements

This module depends on reportlab and lxml, which are both part of the odoo installation.

Contributors

This is a preview of the recently viewed products by the user.
Once the user has seen at least one product this snippet will be visible.

Recently viewed Products