Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions product_barcode_sequence/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
========================
Product Barcode Sequence
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:14df7d0f61557716727fca1494e708b4c6cf3c08e75ff3681712f14c2372c871
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/17.0/product_barcode_sequence
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_barcode_sequence
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows automatic assignment of EAN barcodes to products
based on their category. It uses sequences to generate unique barcode
numbers and adds the correct GTIN check digit.

Features:

- Configure barcode generation per product category
- Automatic barcode generation when creating products
- Support for EAN-13 format with GTIN check digit
- Configurable barcode prefixes per category
- Manual barcode generation action for existing products

**Table of contents**

.. contents::
:local:

Usage
=====

Automatic Generation:

When you create a new product in a category configured for barcode
generation, the system will automatically assign a unique EAN-13
barcode.

Manual Generation:

For existing products without barcodes:

1. Select the products from the product list
2. Use the **Generate Barcode** action
3. The system will generate barcodes based on their category
configuration

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_barcode_sequence%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Open Source Integrators

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/17.0/product_barcode_sequence>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions product_barcode_sequence/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2026 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
21 changes: 21 additions & 0 deletions product_barcode_sequence/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2026 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Product Barcode Sequence",
"version": "17.0.1.0.0",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-attribute",
"license": "AGPL-3",
"category": "Product",
"summary": "Automatically assign EAN barcodes to products by category",
"depends": ["product"],
"data": [
"views/product_category.xml",
"data/ir_actions_server.xml",
],
"installable": True,
"auto_install": False,
"application": False,
"demo": [],
}
15 changes: 15 additions & 0 deletions product_barcode_sequence/data/ir_actions_server.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Copyright 2026 Open Source Integrators
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<!-- Server Action: Generate Barcodes for Products -->
<record id="action_generate_barcode" model="ir.actions.server">
<field name="name">Generate Barcode</field>
<field name="model_id" ref="product.model_product_product" />
<field name="state">code</field>
<field name="code">
records.action_generate_barcode()
</field>
<field name="binding_model_id" ref="product.model_product_product" />
<field name="binding_view_types">list</field>
</record>
</odoo>
136 changes: 136 additions & 0 deletions product_barcode_sequence/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_barcode_sequence
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-19 13:07+0000\n"
"PO-Revision-Date: 2026-02-19 13:07+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: product_barcode_sequence
#: model:ir.model.fields,field_description:product_barcode_sequence.field_product_category__auto_generate_barcode
msgid "Auto Generate Barcode"
msgstr "Générer automatiquement le code-barres"

#. module: product_barcode_sequence
#: model:ir.model.fields,help:product_barcode_sequence.field_product_category__auto_generate_barcode
msgid ""
"Automatically generate EAN barcode when creating products in this category."
msgstr ""
"Générer automatiquement le code-barres EAN lors de la création de produits "
"dans cette catégorie."

#. module: product_barcode_sequence
#: model_terms:ir.ui.view,arch_db:product_barcode_sequence.product_category_form_view
msgid "Barcode Configuration"
msgstr "Configuration du code-barres"

#. module: product_barcode_sequence
#. odoo-python
#: code:addons/product_barcode_sequence/models/product_product.py:0
#, python-format
msgid "Barcode Generation"
msgstr "Génération du code-barres"

#. module: product_barcode_sequence
#: model:ir.model.fields,field_description:product_barcode_sequence.field_product_category__barcode_prefix
msgid "Barcode Prefix"
msgstr "Préfixe du code-barres"

#. module: product_barcode_sequence
#: model:ir.model.fields,field_description:product_barcode_sequence.field_product_category__barcode_sequence_id
msgid "Barcode Sequence"
msgstr "Séquence du code-barres"

#. module: product_barcode_sequence
#. odoo-python
#: code:addons/product_barcode_sequence/models/product_product.py:0
#, python-format
msgid "Barcode must be 12 digits to calculate GTIN check digit"
msgstr ""
"Le code-barres doit contenir 12 chiffres pour calculer le chiffre de contrôle "
"GTIN"

#. module: product_barcode_sequence
#. odoo-python
#: code:addons/product_barcode_sequence/models/product_category.py:0
#, python-format
msgid "Barcode prefix cannot be empty"
msgstr "Le préfixe du code-barres ne peut pas être vide"

#. module: product_barcode_sequence
#. odoo-python
#: code:addons/product_barcode_sequence/models/product_category.py:0
#, python-format
msgid "Barcode prefix cannot exceed 12 digits"
msgstr "Le préfixe du code-barres ne peut pas dépasser 12 chiffres"

#. module: product_barcode_sequence
#. odoo-python
#: code:addons/product_barcode_sequence/models/product_category.py:0
#, python-format
msgid "Barcode prefix must contain only digits"
msgstr "Le préfixe du code-barres doit contenir uniquement des chiffres"

#. module: product_barcode_sequence
#: model:ir.model.fields,field_description:product_barcode_sequence.field_product_product__can_generate_barcode
msgid "Can Generate Barcode"
msgstr "Peut générer un code-barres"

#. module: product_barcode_sequence
#: model:ir.actions.server,name:product_barcode_sequence.action_generate_barcode
msgid "Generate Barcode"
msgstr "Générer le code-barres"

#. module: product_barcode_sequence
#: model:ir.model.fields,help:product_barcode_sequence.field_product_product__can_generate_barcode
msgid ""
"Indicates if this product can have a barcode automatically generated based "
"on its category configuration"
msgstr ""
"Indique si ce produit peut avoir un code-barres généré automatiquement en "
"fonction de la configuration de sa catégorie"

#. module: product_barcode_sequence
#: model:ir.model.fields,help:product_barcode_sequence.field_product_category__barcode_prefix
msgid ""
"Prefix used to generate EAN barcodes for products created with this "
"category. Should be 1-12 digits."
msgstr ""
"Préfixe utilisé pour générer les codes-barres EAN des produits créés avec "
"cette catégorie. Doit contenir 1-12 chiffres."

#. module: product_barcode_sequence
#: model:ir.model,name:product_barcode_sequence.model_product_category
msgid "Product Category"
msgstr "Catégorie de produit"

#. module: product_barcode_sequence
#: model:ir.model,name:product_barcode_sequence.model_product_product
msgid "Product Variant"
msgstr "Variante de produit"

#. module: product_barcode_sequence
#: model:ir.model.fields,help:product_barcode_sequence.field_product_category__barcode_sequence_id
msgid ""
"Sequence used to generate unique barcode numbers for products in this "
"category."
msgstr ""
"Séquence utilisée pour générer des numéros de code-barres uniques pour les "
"produits de cette catégorie."

#. module: product_barcode_sequence
#. odoo-python
#: code:addons/product_barcode_sequence/models/product_product.py:0
#, python-format
msgid "Successfully generated barcodes for %d products"
msgstr "Code-barres générés avec succès pour %d produits"
Loading
Loading