Skip to content

Commit 5a100ce

Browse files
committed
[ADD] product_barcode_sequence: generate product barcodes
1 parent adec51b commit 5a100ce

File tree

17 files changed

+1085
-0
lines changed

17 files changed

+1085
-0
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
========================
2+
Product Barcode Sequence
3+
========================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:14df7d0f61557716727fca1494e708b4c6cf3c08e75ff3681712f14c2372c871
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
20+
:target: https://github.com/OCA/product-attribute/tree/17.0/product_barcode_sequence
21+
:alt: OCA/product-attribute
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_barcode_sequence
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows automatic assignment of EAN barcodes to products
32+
based on their category. It uses sequences to generate unique barcode
33+
numbers and adds the correct GTIN check digit.
34+
35+
Features:
36+
37+
- Configure barcode generation per product category
38+
- Automatic barcode generation when creating products
39+
- Support for EAN-13 format with GTIN check digit
40+
- Configurable barcode prefixes per category
41+
- Manual barcode generation action for existing products
42+
43+
**Table of contents**
44+
45+
.. contents::
46+
:local:
47+
48+
Usage
49+
=====
50+
51+
Automatic Generation:
52+
53+
When you create a new product in a category configured for barcode
54+
generation, the system will automatically assign a unique EAN-13
55+
barcode.
56+
57+
Manual Generation:
58+
59+
For existing products without barcodes:
60+
61+
1. Select the products from the product list
62+
2. Use the **Generate Barcode** action
63+
3. The system will generate barcodes based on their category
64+
configuration
65+
66+
Bug Tracker
67+
===========
68+
69+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
70+
In case of trouble, please check there if your issue has already been reported.
71+
If you spotted it first, help us to smash it by providing a detailed and welcomed
72+
`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**>`_.
73+
74+
Do not contact contributors directly about support or help with technical issues.
75+
76+
Credits
77+
=======
78+
79+
Authors
80+
-------
81+
82+
* Open Source Integrators
83+
84+
Maintainers
85+
-----------
86+
87+
This module is maintained by the OCA.
88+
89+
.. image:: https://odoo-community.org/logo.png
90+
:alt: Odoo Community Association
91+
:target: https://odoo-community.org
92+
93+
OCA, or the Odoo Community Association, is a nonprofit organization whose
94+
mission is to support the collaborative development of Odoo features and
95+
promote its widespread use.
96+
97+
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/17.0/product_barcode_sequence>`_ project on GitHub.
98+
99+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright 2026 Open Source Integrators
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from . import models
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2026 Open Source Integrators
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Product Barcode Sequence",
6+
"version": "17.0.1.0.0",
7+
"author": "Open Source Integrators, Odoo Community Association (OCA)",
8+
"website": "https://github.com/OCA/product-attribute",
9+
"license": "AGPL-3",
10+
"category": "Product",
11+
"summary": "Automatically assign EAN barcodes to products by category",
12+
"depends": ["product", "stock"],
13+
"data": [
14+
"views/product_category.xml",
15+
"data/ir_actions_server.xml",
16+
],
17+
"installable": True,
18+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- Copyright 2026 Open Source Integrators
2+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
3+
<odoo noupdate="1">
4+
<!-- Server Action: Generate Barcodes for Products -->
5+
<record id="action_generate_barcode" model="ir.actions.server">
6+
<field name="name">Generate Barcode</field>
7+
<field name="model_id" ref="product.model_product_product" />
8+
<field name="state">code</field>
9+
<field name="code">
10+
records.action_generate_barcode()
11+
</field>
12+
<field name="binding_model_id" ref="product.model_product_product" />
13+
<field name="binding_view_types">list</field>
14+
</record>
15+
</odoo>
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * product_barcode_sequence
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 17.0+e\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2026-02-19 13:07+0000\n"
10+
"PO-Revision-Date: 2026-02-19 13:07+0000\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"Language: fr\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: \n"
17+
"Plural-Forms: \n"
18+
19+
#. module: product_barcode_sequence
20+
#: model:ir.model.fields,field_description:product_barcode_sequence.field_product_category__auto_generate_barcode
21+
msgid "Auto Generate Barcode"
22+
msgstr "Générer automatiquement le code-barres"
23+
24+
#. module: product_barcode_sequence
25+
#: model:ir.model.fields,help:product_barcode_sequence.field_product_category__auto_generate_barcode
26+
msgid ""
27+
"Automatically generate EAN barcode when creating products in this category."
28+
msgstr ""
29+
"Générer automatiquement le code-barres EAN lors de la création de produits "
30+
"dans cette catégorie."
31+
32+
#. module: product_barcode_sequence
33+
#: model_terms:ir.ui.view,arch_db:product_barcode_sequence.product_category_form_view
34+
msgid "Barcode Configuration"
35+
msgstr "Configuration du code-barres"
36+
37+
#. module: product_barcode_sequence
38+
#. odoo-python
39+
#: code:addons/product_barcode_sequence/models/product_product.py:0
40+
#, python-format
41+
msgid "Barcode Generation"
42+
msgstr "Génération du code-barres"
43+
44+
#. module: product_barcode_sequence
45+
#: model:ir.model.fields,field_description:product_barcode_sequence.field_product_category__barcode_prefix
46+
msgid "Barcode Prefix"
47+
msgstr "Préfixe du code-barres"
48+
49+
#. module: product_barcode_sequence
50+
#: model:ir.model.fields,field_description:product_barcode_sequence.field_product_category__barcode_sequence_id
51+
msgid "Barcode Sequence"
52+
msgstr "Séquence du code-barres"
53+
54+
#. module: product_barcode_sequence
55+
#. odoo-python
56+
#: code:addons/product_barcode_sequence/models/product_product.py:0
57+
#, python-format
58+
msgid "Barcode must be 12 digits to calculate GTIN check digit"
59+
msgstr ""
60+
"Le code-barres doit contenir 12 chiffres pour calculer le chiffre de contrôle "
61+
"GTIN"
62+
63+
#. module: product_barcode_sequence
64+
#. odoo-python
65+
#: code:addons/product_barcode_sequence/models/product_category.py:0
66+
#, python-format
67+
msgid "Barcode prefix cannot be empty"
68+
msgstr "Le préfixe du code-barres ne peut pas être vide"
69+
70+
#. module: product_barcode_sequence
71+
#. odoo-python
72+
#: code:addons/product_barcode_sequence/models/product_category.py:0
73+
#, python-format
74+
msgid "Barcode prefix cannot exceed 12 digits"
75+
msgstr "Le préfixe du code-barres ne peut pas dépasser 12 chiffres"
76+
77+
#. module: product_barcode_sequence
78+
#. odoo-python
79+
#: code:addons/product_barcode_sequence/models/product_category.py:0
80+
#, python-format
81+
msgid "Barcode prefix must contain only digits"
82+
msgstr "Le préfixe du code-barres doit contenir uniquement des chiffres"
83+
84+
#. module: product_barcode_sequence
85+
#: model:ir.model.fields,field_description:product_barcode_sequence.field_product_product__can_generate_barcode
86+
msgid "Can Generate Barcode"
87+
msgstr "Peut générer un code-barres"
88+
89+
#. module: product_barcode_sequence
90+
#: model:ir.actions.server,name:product_barcode_sequence.action_generate_barcode
91+
msgid "Generate Barcode"
92+
msgstr "Générer le code-barres"
93+
94+
#. module: product_barcode_sequence
95+
#: model:ir.model.fields,help:product_barcode_sequence.field_product_product__can_generate_barcode
96+
msgid ""
97+
"Indicates if this product can have a barcode automatically generated based "
98+
"on its category configuration"
99+
msgstr ""
100+
"Indique si ce produit peut avoir un code-barres généré automatiquement en "
101+
"fonction de la configuration de sa catégorie"
102+
103+
#. module: product_barcode_sequence
104+
#: model:ir.model.fields,help:product_barcode_sequence.field_product_category__barcode_prefix
105+
msgid ""
106+
"Prefix used to generate EAN barcodes for products created with this "
107+
"category. Should be 1-12 digits."
108+
msgstr ""
109+
"Préfixe utilisé pour générer les codes-barres EAN des produits créés avec "
110+
"cette catégorie. Doit contenir 1-12 chiffres."
111+
112+
#. module: product_barcode_sequence
113+
#: model:ir.model,name:product_barcode_sequence.model_product_category
114+
msgid "Product Category"
115+
msgstr "Catégorie de produit"
116+
117+
#. module: product_barcode_sequence
118+
#: model:ir.model,name:product_barcode_sequence.model_product_product
119+
msgid "Product Variant"
120+
msgstr "Variante de produit"
121+
122+
#. module: product_barcode_sequence
123+
#: model:ir.model.fields,help:product_barcode_sequence.field_product_category__barcode_sequence_id
124+
msgid ""
125+
"Sequence used to generate unique barcode numbers for products in this "
126+
"category."
127+
msgstr ""
128+
"Séquence utilisée pour générer des numéros de code-barres uniques pour les "
129+
"produits de cette catégorie."
130+
131+
#. module: product_barcode_sequence
132+
#. odoo-python
133+
#: code:addons/product_barcode_sequence/models/product_product.py:0
134+
#, python-format
135+
msgid "Successfully generated barcodes for %d products"
136+
msgstr "Code-barres générés avec succès pour %d produits"

0 commit comments

Comments
 (0)