Skip to content

Commit

Permalink
[MIG] product_code_unique: pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe authored and pfranck committed Jan 16, 2025
1 parent ffd9eb0 commit 6c9ec1c
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 34 deletions.
38 changes: 21 additions & 17 deletions product_code_unique/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Unique Product Internal Reference
: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/16.0/product_code_unique
:target: https://github.com/OCA/product-attribute/tree/17.0/product_code_unique
: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-16-0/product-attribute-16-0-product_code_unique
:target: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_code_unique
: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=16.0
: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|
Expand All @@ -39,44 +39,48 @@ to make it unique across the database.
Usage
=====

* Unable to save a product when a new internal reference or default_code value is
the same with an existing record.
* A pre_init_hook process is initiated when there exist records without an internal reference(default_code).
A default value is generated to populate empty field as a temporary value.
- Unable to save a product when a new internal reference or
default_code value is the same with an existing record.
- A pre_init_hook process is initiated when there exist records without
an internal reference(default_code). A default value is generated to
populate empty field as a temporary value.

Known issues / Roadmap
======================

* Avoid duplicate warnings. Odoo has a warning for duplicate "Internal Reference" of its own (it doesn't block from saving). Now both warnings are displayed when trying to save a duplicate "Internal Reference".
- Avoid duplicate warnings. Odoo has a warning for duplicate "Internal
Reference" of its own (it doesn't block from saving). Now both
warnings are displayed when trying to save a duplicate "Internal
Reference".

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_code_unique%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_code_unique%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

Contributors
~~~~~~~~~~~~
------------

* Antonio Yamuta <[email protected]>
* Raf Ven <[email protected]>
* Watthanun Khorchai <[email protected]>
* Nedas Žilinskas <[email protected]>
- Antonio Yamuta <[email protected]>
- Raf Ven <[email protected]>
- Watthanun Khorchai <[email protected]>
- Nedas Žilinskas <[email protected]>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -88,6 +92,6 @@ 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/16.0/product_code_unique>`_ project on GitHub.
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/17.0/product_code_unique>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions product_code_unique/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions product_code_unique/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Antonio Yamuta \<<[email protected]>\>
- Raf Ven \<<[email protected]>\>
- Watthanun Khorchai \<<[email protected]>\>
- Nedas Žilinskas \<<[email protected]>\>
4 changes: 0 additions & 4 deletions product_code_unique/readme/CONTRIBUTORS.rst

This file was deleted.

File renamed without changes.
4 changes: 4 additions & 0 deletions product_code_unique/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Avoid duplicate warnings. Odoo has a warning for duplicate "Internal
Reference" of its own (it doesn't block from saving). Now both
warnings are displayed when trying to save a duplicate "Internal
Reference".
1 change: 0 additions & 1 deletion product_code_unique/readme/ROADMAP.rst

This file was deleted.

5 changes: 5 additions & 0 deletions product_code_unique/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Unable to save a product when a new internal reference or default_code
value is the same with an existing record.
- A pre_init_hook process is initiated when there exist records without
an internal reference(default_code). A default value is generated to
populate empty field as a temporary value.
4 changes: 0 additions & 4 deletions product_code_unique/readme/USAGE.rst

This file was deleted.

20 changes: 12 additions & 8 deletions product_code_unique/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Unique Product Internal Reference</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0ddeb0b9117bb302c5a68a2dda8c822ed2138d1ba8088082b2443fa10dfd2e6e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/product-attribute/tree/16.0/product_code_unique"><img alt="OCA/product-attribute" src="https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_code_unique"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/product-attribute/tree/17.0/product_code_unique"><img alt="OCA/product-attribute" src="https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_code_unique"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds a constraint on the internal reference of the product
to make it unique across the database.</p>
<p><strong>Table of contents</strong></p>
Expand All @@ -389,24 +389,28 @@ <h1 class="title">Unique Product Internal Reference</h1>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<ul class="simple">
<li>Unable to save a product when a new internal reference or default_code value is
the same with an existing record.</li>
<li>A pre_init_hook process is initiated when there exist records without an internal reference(default_code).
A default value is generated to populate empty field as a temporary value.</li>
<li>Unable to save a product when a new internal reference or
default_code value is the same with an existing record.</li>
<li>A pre_init_hook process is initiated when there exist records without
an internal reference(default_code). A default value is generated to
populate empty field as a temporary value.</li>
</ul>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>Avoid duplicate warnings. Odoo has a warning for duplicate “Internal Reference” of its own (it doesn’t block from saving). Now both warnings are displayed when trying to save a duplicate “Internal Reference”.</li>
<li>Avoid duplicate warnings. Odoo has a warning for duplicate “Internal
Reference” of its own (it doesn’t block from saving). Now both
warnings are displayed when trying to save a duplicate “Internal
Reference”.</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/product-attribute/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/product-attribute/issues/new?body=module:%20product_code_unique%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/product-attribute/issues/new?body=module:%20product_code_unique%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -433,7 +437,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/product-attribute/tree/16.0/product_code_unique">OCA/product-attribute</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/product-attribute/tree/17.0/product_code_unique">OCA/product-attribute</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down

0 comments on commit 6c9ec1c

Please sign in to comment.