Skip to content

Commit dec7925

Browse files
committed
[MIG] product_unique_barcode: Migration to 18.0
1 parent 2e426c0 commit dec7925

File tree

9 files changed

+483
-28
lines changed

9 files changed

+483
-28
lines changed

product_unique_barcode/README.rst

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,63 @@
1-
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
2-
:target: https://www.gnu.org/licenses/agpl
3-
:alt: License: AGPL-3
4-
51
======================
62
Product unique barcode
73
======================
84

9-
* This module ensures that you enter a Unique Barcode for your Products
10-
* Multi company aware
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:7b2f1ef4d3b6b8d6571d28b3217576dc950085cfaba4cf527ea8b6b762124584
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-NuoBiT%2Fodoo--addons-lightgray.png?logo=github
20+
:target: https://github.com/NuoBiT/odoo-addons/tree/18.0/product_unique_barcode
21+
:alt: NuoBiT/odoo-addons
22+
23+
|badge1| |badge2| |badge3|
24+
25+
This module ensures that you enter a Unique Barcode for your Products
26+
27+
**Table of contents**
28+
29+
.. contents::
30+
:local:
1131

1232
Bug Tracker
1333
===========
1434

15-
Bugs are tracked on `GitHub Issues
16-
<https://github.com/nuobit/odoo-addons/issues>`_. In case of trouble, please
17-
check there if your issue has already been reported. If you spotted it first,
18-
help us smashing it by providing a detailed and welcomed feedback.
35+
Bugs are tracked on `GitHub Issues <https://github.com/NuoBiT/odoo-addons/issues>`_.
36+
In case of trouble, please check there if your issue has already been reported.
37+
If you spotted it first, help us to smash it by providing a detailed and welcomed
38+
`feedback <https://github.com/NuoBiT/odoo-addons/issues/new?body=module:%20product_unique_barcode%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
39+
40+
Do not contact contributors directly about support or help with technical issues.
1941

2042
Credits
2143
=======
2244

45+
Authors
46+
-------
47+
48+
* NuoBiT Solutions SL
49+
2350
Contributors
2451
------------
2552

26-
* Eric Antones <eantones@nuobit.com>
53+
- `NuoBiT <https://www.nuobit.com>`__:
54+
55+
- Eric Antones eantones@nuobit.com
56+
- Deniz Gallo dgallo@nuobit.com
57+
58+
Maintainers
59+
-----------
60+
61+
This module is part of the `NuoBiT/odoo-addons <https://github.com/NuoBiT/odoo-addons/tree/18.0/product_unique_barcode>`_ project on GitHub.
62+
63+
You are welcome to contribute.

product_unique_barcode/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
2-
31
from . import models
42

53
from .hooks import pre_init_hook_barcode_check
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
2-
# Eric Antones <eantones@nuobit.com>
1+
# Copyright NuoBiT - Eric Antones <eantones@nuobit.com>
2+
# Copyright 2025 NuoBiT - Deniz Gallo <dgallo@nuobit.com>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
44

55
{
66
"name": "Product unique barcode",
77
"summary": "This module ensures that you enter a Unique Barcode for your Products",
8-
"version": "14.0.1.0.0",
8+
"version": "18.0.1.0.0",
99
"category": "Sales",
10-
"author": "NuoBiT Solutions, S.L., Eric Antones",
10+
"author": "NuoBiT Solutions SL",
1111
"website": "https://github.com/NuoBiT/odoo-addons",
1212
"license": "AGPL-3",
1313
"depends": [
1414
"product",
1515
],
1616
"pre_init_hook": "pre_init_hook_barcode_check",
17-
"installable": True,
18-
"auto_install": False,
1917
}

product_unique_barcode/hooks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
2-
# Eric Antones <eantones@nuobit.com>
1+
# Copyright NuoBiT - Eric Antones <eantones@nuobit.com>
2+
# Copyright 2025 NuoBiT - Deniz Gallo <dgallo@nuobit.com>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
44

55
from odoo import _
@@ -30,5 +30,5 @@ def pre_init_hook_barcode_check(cr):
3030
products = sorted(["[%i] %s" % p for p in cr.fetchall()])
3131
if products:
3232
raise ValidationError(
33-
_("Conflicting barcodes exist: %s" % ", ".join(products))
33+
_("Conflicting barcodes exist: {}").format(", ".join(products))
3434
)
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
2-
3-
from . import models
1+
from . import product

product_unique_barcode/models/models.py renamed to product_unique_barcode/models/product.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
2-
# Eric Antones <eantones@nuobit.com>
1+
# Copyright NuoBiT - Eric Antones <eantones@nuobit.com>
2+
# Copyright 2025 NuoBiT - Deniz Gallo <dgallo@nuobit.com>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
44

55
from odoo import api, models
@@ -29,7 +29,7 @@ def _check_barcode(self):
2929

3030
if barcode:
3131
raise ValidationError(
32-
_("Error! The Barcode %s already exists" % record.barcode)
32+
_("Error! The Barcode {} already exists").format(record.barcode)
3333
)
3434

3535
# replace current sql_constraint with a dummy one
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- [NuoBiT](https://www.nuobit.com):
2+
- Eric Antones <eantones@nuobit.com>
3+
- Deniz Gallo <dgallo@nuobit.com>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module ensures that you enter a Unique Barcode for your Products

0 commit comments

Comments
 (0)