OdooWiki OCA HUB

Generate Barcodes for Stock Locations

barcodes_generator_location folder_open OCA/stock-logistics-barcode open_in_new
Tools License: AGPL-3

This module expands Odoo functionality, allowing user to generate barcode depending on a given barcode rule for Stock Locations.

For example, a typical pattern for partners is "042........." that means that: * the EAN13 code will begin by '042' * followed by 0 digits (named Barcode Base in this module) * a 13 digit control

With this module, it is possible to:

  • Assign a pattern (barcode.rule) to a stock.location
  • 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)
  • automatically 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

auto_awesome What this module does

AI-generated from the code · Odoo 17.0

Lets you assign a barcode rule to a stock location and generate a barcode for it, either from a manually entered base or automatically from a sequence.

This module adds barcode generation to stock locations. On the stock location form you get a new "Barcode" group where you can pick a barcode rule (only rules set up for stock locations are offered), choose how the barcode base is defined, and then create the barcode.

  • If the rule uses a manual base, you type the base yourself.
  • If the rule uses a sequence, a "Generate Base (Using Sequence)" button fills the base automatically, and the base field becomes read-only.
  • Once a rule and a base are present, a "Generate Barcode" button creates the final barcode and stores it on the location.

The barcode field is placed on the location form automatically, so it appears even if another module did not already add it. Access to these fields and buttons is limited to users in the barcode generation group.

The module also extends barcode rules so that "Stock Location" becomes a possible target model, meaning a rule can be dedicated to locations. When the module is uninstalled, barcode rules that were set up for stock locations are removed because they are no longer useful.

It works together with the stock location model and the barcode rule model, and relies on the shared barcode generation mixin for the actual generation logic.

Models and fields (2)
  • barcode.rule · extends an existing modelgenerate_model
  • stock.location · new model

Text generated by AI (DeepSeek) from reading the Odoo 17.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 5 confirmed, 4 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/stock-logistics-barcode.

terminal Installation and usage

OCA documentation · Odoo 17.0

To configure this module, see the 'Configuration' Section of the description of the module 'barcodes_generator_abstract'

To use this module, you need to:

  • Go to a Stock Location form

1 for manual generation

  • Set a Barcode Rule
  • Set a Barcode Base
  • click on the button 'Generate Barcode (Using Barcode Rule)'

2 for automatic generation

  • Set a Barcode Rule
  • click on the button 'Generate Base (Using Sequence)'
  • click on the button 'Generate Barcode (Using Barcode Rule)'

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.