Repository
OCA/stock-logistics-barcode · module folder · Try on Runboat
Module version
1.0.0
Category
Tools
Folder size
0.23 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/stock-logistics-barcode
Last tracking update
2026-08-07 09:06:27
Authors
Odoo Community Association (OCA), GRAP, La Louve
Maintainers
Odoo Community Association (OCA), GRAP, La Louve
Committers
OCA-git-bot, oca-ci, Stéphane Mangin
Odoo dependencies
OCA/stock-logistics-barcode:
odoo/odoo:
- web
- bus
- uom
Python dependencies
python-barcode
System dependencies
None
Required by
None
Description
This module expands Odoo functionality, allowing user to generate
barcode depending on a given barcode rule for Products.

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

Another common pattern is "8012345....." which means that:
* the EAN13 code will begin with '8012345'
* followed by 5 digits (named Barcode Base in this module)
* and finally the 13th digit is the control digit

Note that a dot is not necessary in the pattern as the control digit is
added automatically.

With this module, it is possible to:

- Assign a pattern (barcode.rule) to a product.product

- 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 Odoo to increment a
    sequence. (typical case of a customer number incrementation)

- Generate a barcode, based on the defined pattern and the barcode base

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
product_variant_easy_edit_view product.product Inherits product.product_variant_easy_edit_view
view_product_product_form product.product form Inherits product.product_normal_form_view
view_product_template_form product.template form Inherits product.product_template_only_form_view
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (3)

New fields (1)
  • generate_model Selection
    selection_add=[('product.product', 'Products')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • barcode_base Integer
    compute='_compute_barcode_base' inverse='_inverse_barcode_base'
  • barcode_rule_id Many2one → barcode.rule
    comodel_name='barcode.rule' compute='_compute_barcode_rule_id' inverse='_inverse_barcode_rule_id' string='Barcode Rule'
  • generate_type Selection
    readonly=True related='product_variant_ids.barcode_rule_id.generate_type' string='Generate Type'
Public methods (3)
  • generate_barcode(self)
  • generate_base(self)
  • onchange_barcode_rule_id(self)
    @api.onchange('barcode_rule_id')

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…