-
Notifications
You must be signed in to change notification settings - Fork 22
[18.0][MIG] product_unique_barcode: Migration to 18.0 #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 18.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the product_unique_barcode module from an earlier version to Odoo 18.0, implementing unique barcode constraints for products within the same company.
- Adds comprehensive barcode validation logic to prevent duplicate barcodes within the same company
- Implements pre-installation hooks to check for existing barcode conflicts
- Includes module documentation and metadata files for the new version
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| product_unique_barcode/manifest.py | Module manifest defining dependencies, version 18.0.1.0.0, and pre-init hook |
| product_unique_barcode/models/product.py | Core logic implementing barcode uniqueness constraint with company-specific validation |
| product_unique_barcode/hooks.py | Pre-installation hook to detect existing barcode conflicts before module installation |
| product_unique_barcode/init.py | Module initialization importing models and hooks |
| product_unique_barcode/models/init.py | Models package initialization |
| product_unique_barcode/README.rst | Module documentation in reStructuredText format |
| product_unique_barcode/readme/DESCRIPTION.md | Brief module description |
| product_unique_barcode/readme/CONTRIBUTORS.md | Contributors information |
| product_unique_barcode/pyproject.toml | Python project configuration |
| product_unique_barcode/static/description/index.html | Generated HTML documentation |
| # Copyright NuoBiT - Eric Antones <eantones@nuobit.com> | ||
| # Copyright 2025 NuoBiT - Deniz Gallo <dgallo@nuobit.com> | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) | ||
|
|
||
| from odoo import api, models |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing exactly 2 blank lines between the copyright/license header and imports as per coding guidelines.
| # Copyright NuoBiT - Eric Antones <eantones@nuobit.com> | ||
| # Copyright 2025 NuoBiT - Deniz Gallo <dgallo@nuobit.com> | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) | ||
|
|
||
| from odoo import _ |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing exactly 2 blank lines between the copyright/license header and imports as per coding guidelines.
| # Copyright NuoBiT - Eric Antones <eantones@nuobit.com> | ||
| # Copyright 2025 NuoBiT - Deniz Gallo <dgallo@nuobit.com> | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) | ||
|
|
||
| { |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing exactly 2 blank lines between the copyright/license header and the start of the code as per coding guidelines.
| @@ -0,0 +1 @@ | |||
| from . import product | |||
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The init.py file should not have a copyright/license header according to coding guidelines.
| @@ -0,0 +1 @@ | |||
| This module ensures that you enter a Unique Barcode for your Products | |||
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DESCRIPTION.md file should end with a blank line.
dec7925 to
c925ac8
Compare
No description provided.