EAN-13 GTIN Barcode Generator: generate barcodes from your GS1 company prefix
by Aerya IT Solutions https://aerya.net$ 12.05
Odoo 17, 18, 19 and 20, Community and Enterprise · Developed in the European Union by Aerya IT Solutions
EAN-13 GTIN Barcode Generator: generate barcodes from your GS1 company prefix
Products without a barcode cannot be scanned at the warehouse or the till. GS1 licenses a company prefix, and the rest of each EAN-13 is yours to number. This module numbers it: company prefix, item reference from a sequence, GS1 check digit.
Check digit computed per GS1
Given on creation or on demand, never twice
Numbers typed by hand are skipped
The screenshots use a fictitious company and invented products, codes and barcodes.
Runs on Odoo.sh and on-premise, not on Odoo Online (SaaS), where Odoo does not allow modules with Python code. Please buy the version that matches your database.
in Odoo 17
no warnings
Community and Enterprise
Products without a barcode cannot be scanned
A product that has no barcode cannot be scanned at the warehouse, at the till or on a delivery. Someone has to invent a number for each of them, type it in, and make sure no other product already has it. A wrong check digit makes the scanner refuse the label, and a number used twice sends the wrong item to the customer. The problem grows with every new product, and it is worse when thousands of products are imported at once.
What it does
GS1 gives a company a prefix, and the rest of each EAN-13 is yours to number. The module numbers it for you. A barcode is built from your GS1 Company Prefix, the next item reference from a sequence, padded to 12 digits, and the GS1 check digit. It is given when a product is created, or on demand for products that exist. It never replaces a barcode that is already there and never gives the same number twice.
How it works, step by step
- Enter the prefix once. Open Settings › General Settings › Product Barcodes. Fill in the GS1 Company Prefix, 6 to 11 digits, not starting with 0, and the Next Item Reference. Prefixes 20 to 29 make numbers for use inside the company only.
- Choose when to generate. Tick Barcode on Creation to give a barcode to every new product that has none. Services and combos are left out.
- Generate for one product. Press Generate Barcode on the product or variant form.
- Generate for many products. Select products in the list and choose Generate Barcodes in the Actions menu. Products that already have a barcode are skipped.
- Print labels and scan. The barcodes are the ordinary barcode field of the product, so labels, the point of sale and the warehouse use them as usual.
How a number is made
- Prefix, then the item reference padded to 12 digits in total, then the check digit.
- The check digit uses the GS1 weights 3 and 1 from the right. The calculation is unit-tested without a database.
- A number already used by a product, an archived product or a packaging is skipped, and the next one is tried.
- Each company has its own prefix, sequence and option.
- An 11-digit prefix leaves 10 item references, a 7-digit one 100,000. When the references run out, the module stops with a message.
- The sequence moves only forward. A number that was given is never given again.
Set the prefix once
Settings > General Settings > Product Barcodes: the GS1 Company Prefix (6 to 11 digits, not starting with 0), the next item reference and the Barcode on Creation option. Prefixes 20 to 29 make numbers for use inside the company only.
Each company has its own prefix and sequence.

One button, or none at all
The Generate Barcode button on the product, the Generate Barcodes action on a selection, or automatically when a product is created without one (services and combos excepted).
A barcode already used by a product, an archived product or a packaging is skipped; existing barcodes are never replaced.

Screenshots of Odoo 17 Enterprise.
Settings and options
| GS1 Company Prefix | 6 to 11 digits, not starting with 0. Per company. |
| Next Item Reference | The number the sequence gives next. Per company. |
| Barcode on Creation | Gives a barcode to every product created without one. |
| Generate Barcode | Button on the product and variant forms. |
| Generate Barcodes | Action on the product and variant lists, for a selection. |
Users who may edit products may generate their barcodes.
What it does not do
- It stops with a message when the company has no prefix, when the prefix is not 6 to 11 digits or starts with 0, when no item reference is left, when 1,000 numbers in a row are already used, or when Barcode on Creation is ticked without a prefix.
- It does not make GTIN-8, UPC-A or GTIN-14 numbers.
- It does not make barcodes for packagings.
- It does not register your numbers with GS1. The prefix comes from GS1, and you remain responsible for using only a prefix you hold.
- It never replaces a barcode a product already has.
Requirements
- Odoo 17, 18, 19 or 20, Community or Enterprise.
- Only the core Product module, and any app that uses products.
- A GS1 Company Prefix, or a prefix from 20 to 29 for numbers used inside your company.
- A host that allows modules with Python code: Odoo.sh or your own server.
- English, Spanish and Romanian translations.
Frequently asked questions
Where do I get the company prefix?
From GS1, the organisation that licenses prefixes. The module numbers the rest of the EAN-13 and does not issue prefixes.
Can I use it for products that already have barcodes?
Yes. Those products are skipped, and existing barcodes are never replaced.
What if two products would get the same number?
A number already used by a product, an archived product or a packaging is skipped.
What about several companies?
Each company has its own prefix, sequence and option.
Which numbers does it not make?
Only EAN-13. GTIN-8, UPC-A and GTIN-14 are not covered.
Explore our other apps
More modules by Aerya IT Solutions for Odoo 17, built to work together.
Questions or a custom quote?
Write to info@aerya.ro for questions about the module, its installation or custom development.
Developed in the European Union by Aerya IT Solutions, Odoo implementation and development. aerya.net
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 282 |
| Technical Name |
aerya_barcode_generate |
| License | OPL-1 |
| Website | https://aerya.net |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module