diff --git a/product_multi_unique_barcode/README.rst b/product_multi_unique_barcode/README.rst new file mode 100644 index 000000000..eb8024dc5 --- /dev/null +++ b/product_multi_unique_barcode/README.rst @@ -0,0 +1,64 @@ +============================ +Product Multi Unique Barcode +============================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:ba899fd5e28c69ce2455c1be7d37613f05c0877a091a1452ff03e0adff65cd2a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-NuoBiT%2Fodoo--addons-lightgray.png?logo=github + :target: https://github.com/NuoBiT/odoo-addons/tree/18.0/product_multi_unique_barcode + :alt: NuoBiT/odoo-addons + +|badge1| |badge2| |badge3| + +Glue module between product_unique_barcode and product_multi_barcode + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* NuoBiT Solutions SL + +Contributors +------------ + +- `NuoBiT `__: + + - Eric Antones eantones@nuobit.com + - Frank Cespedes fcespedes@nuobit.com + - Deniz Gallo dgallo@nuobit.com + +Maintainers +----------- + +This module is part of the `NuoBiT/odoo-addons `_ project on GitHub. + +You are welcome to contribute. diff --git a/product_multi_unique_barcode/__init__.py b/product_multi_unique_barcode/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/product_multi_unique_barcode/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_multi_unique_barcode/__manifest__.py b/product_multi_unique_barcode/__manifest__.py new file mode 100644 index 000000000..404571058 --- /dev/null +++ b/product_multi_unique_barcode/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 NuoBiT Solutions SL - Eric Antones +# Copyright 2024 NuoBiT Solutions SL - Frank Cespedes +# Copyright 2025 NuoBiT Solutions SL - Deniz Gallo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +{ + "name": "Product Multi Unique Barcode", + "summary": "Glue module between product_unique_barcode and product_multi_barcode", + "version": "18.0.1.0.0", + "category": "Product Management", + "author": "NuoBiT Solutions SL", + "website": "https://github.com/NuoBiT/odoo-addons", + "license": "AGPL-3", + "depends": ["product_unique_barcode", "product_multi_barcode"], + "auto_install": True, +} diff --git a/product_multi_unique_barcode/models/__init__.py b/product_multi_unique_barcode/models/__init__.py new file mode 100644 index 000000000..940ac3279 --- /dev/null +++ b/product_multi_unique_barcode/models/__init__.py @@ -0,0 +1 @@ +from . import product_barcode diff --git a/product_multi_unique_barcode/models/product_barcode.py b/product_multi_unique_barcode/models/product_barcode.py new file mode 100644 index 000000000..5feb6d3d3 --- /dev/null +++ b/product_multi_unique_barcode/models/product_barcode.py @@ -0,0 +1,19 @@ +# Copyright 2024 NuoBiT Solutions SL - Eric Antones +# Copyright 2024 NuoBiT Solutions SL - Frank Cespedes +# Copyright 2025 NuoBiT Solutions SL - Deniz Gallo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo import models + + +class ProductBarcode(models.Model): + _inherit = "product.barcode" + + def _get_duplicates(self, barcodes_to_check): + self.ensure_one() + res = super()._get_duplicates(barcodes_to_check) + if self.company_id: + res = res.filtered( + lambda x: x.company_id.id == self.company_id.id or not x.company_id + ) + return res diff --git a/product_multi_unique_barcode/pyproject.toml b/product_multi_unique_barcode/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/product_multi_unique_barcode/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/product_multi_unique_barcode/readme/CONTRIBUTORS.md b/product_multi_unique_barcode/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..7127a028f --- /dev/null +++ b/product_multi_unique_barcode/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- [NuoBiT](https://www.nuobit.com): + - Eric Antones + - Frank Cespedes + - Deniz Gallo diff --git a/product_multi_unique_barcode/readme/DESCRIPTION.md b/product_multi_unique_barcode/readme/DESCRIPTION.md new file mode 100644 index 000000000..459c4453c --- /dev/null +++ b/product_multi_unique_barcode/readme/DESCRIPTION.md @@ -0,0 +1 @@ +Glue module between product_unique_barcode and product_multi_barcode diff --git a/product_multi_unique_barcode/static/description/icon.png b/product_multi_unique_barcode/static/description/icon.png new file mode 100644 index 000000000..1cd641e79 Binary files /dev/null and b/product_multi_unique_barcode/static/description/icon.png differ diff --git a/product_multi_unique_barcode/static/description/index.html b/product_multi_unique_barcode/static/description/index.html new file mode 100644 index 000000000..fb6da2541 --- /dev/null +++ b/product_multi_unique_barcode/static/description/index.html @@ -0,0 +1,421 @@ + + + + + +Product Multi Unique Barcode + + + +
+

Product Multi Unique Barcode

+ + +

Beta License: AGPL-3 NuoBiT/odoo-addons

+

Glue module between product_unique_barcode and product_multi_barcode

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • NuoBiT Solutions SL
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is part of the NuoBiT/odoo-addons project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000000000..92c0f5d7c --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-product_unique_barcode@git+https://github.com/nuobit/odoo-addons.git@refs/pull/732/head#subdirectory=product_unique_barcode