Generate Barcodes (Abstract)

Generate Barcodes (Abstract)

by Contaura LLC · original work by GRAP, La Louve, LasLabs, OCA
barcodes_generator_abstract
$ 29.00

Generate Barcodes for Any Models

1.0

One purchase covers every version. Already bought it? Sign in.

Generate Barcodes for any Models (Abstract)

This module expends Tulio functionality, allowing user to generate barcode depending on a given barcode rule for any Model.

For example, a typical pattern for products is "20.....{NNNDD}" that means that: * the EAN13 code will begin by '20' * followed by 5 digits (named Barcode Base in this module) * and after 5 others digits to define the variable price * a 13 digit control

With this module, it is possible to:

  • Affect a pattern (barcode.rule) to a model
  • Define a Barcode base:
    • manually, if the base of the barcode must be set by a user. (typically an internal code defined in your company)
    • automaticaly by a sequence, if you want to let Tulio to increment a sequence. (typical case of a customer number incrementation)
  • Generate a barcode, based on the defined pattern and the barcode base

Installation

This module use an extra python library named 'python-barcode' you should install to make barcode generation works properly.

sudo pip install python-barcode

Configuration

To configure this module, you need to:

  • Go to Settings / Technical / Sequences & Identifiers / Barcode Nomenclatures
  • Select a Nomenclature
  • Create or select a rule
/barcodes_generator_abstract/static/description/barcode_rule_tree.png
  • For manual generation, set:
    • 'Base set Manually' in 'Generate Type'
    • Set the model
/barcodes_generator_abstract/static/description/barcode_rule_form_manual.png
  • For automatic generation, set:
    • 'Base managed by Sequence' in 'Generate Type'
    • Set the model
    • Generate a new sequence by button, or affect a existing one
/barcodes_generator_abstract/static/description/barcode_rule_form_sequence.png

In all cases, padding will be computed automaticaly, based on the number of '.' in the Barcode Pattern field.

Usage

This module is an abstract module. You can configure Barcode Rule, but to enable this feature, you need to install an extra module for a given model. This repository provide 'barcodes_generator_product' and 'barcodes_generator_partner' module to generate barcode for product or partner model.

Alternatively, you can develop a custom module for a custom model. See 'Inheritance' parts.

Try this module on Runbot

Inheritance

If you want to generate barcode for another model, you can create a custom module that inherits on 'barcodes_generator_abstract' and inherit your model like that:

class MyModel(models.Model):
_name = 'my.model' _inherit = ['my.model', 'barcode.generate.mixin']
class barcode_rule(models.Model):

_inherit = 'barcode.rule'

generate_model = fields.Selection(selection_add=[('my.model', 'My Model')])

Finally, you should inherit your model view adding buttons and fields.

Note

Your model should have a field 'barcode' defined.

Known issues / Roadmap

  • On barcode.rule model, constraint and domain system could be set between 'type' and 'generate_model' fields.
  • Cache is being cleared in a constraint in barcode.rule. Mutating in a constraint is bad practice & should be moved somewhere.
Technical namebarcodes_generator_abstract
Module version12.0.1.0.4
Tulio versions1.0
CategoryTools
PublisherContaura LLC
Ported to Tulio, tested and supported by Contaura LLC.
Original authorsGRAP, La Louve, LasLabs, OCA
LicenseAGPL-3
Open source: you may use, change and share this module under its license. The price covers the Tulio port, its testing on Tulio 1.0 and the download.
Python librariesbarcode
Install them on the server with pip before installing the module.
Requires (Tulio core)barcodes
Lines of code316
Downloads0
Released12/06/2026
12.0.1.0.4 Tulio 1.0 · 12/06/2026