From 2743d8d704d5ba11dc530e8631847bd95c389761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kh=C3=B4i=20=28Ki=C3=AAn=20Kim=29?= Date: Wed, 4 Dec 2024 12:06:37 +0700 Subject: [PATCH] [MOV] product_template_tags_code: product_template_tags_code becomes product_tags_code --- .../README.rst | 14 +++++----- .../__init__.py | 0 .../__manifest__.py | 4 +-- .../i18n/es.po | 0 .../i18n/it.po | 0 .../i18n/product_tags_code.pot | 0 product_tags_code/models/__init__.py | 1 + .../models/product_tag.py | 2 +- .../pyproject.toml | 0 .../readme/CONFIGURE.md | 0 .../readme/CONTRIBUTORS.md | 0 .../readme/CREDITS.md | 0 .../readme/DESCRIPTION.md | 0 .../static/description/icon.png | Bin .../static/description/index.html | 12 ++++----- .../tests/__init__.py | 2 +- .../tests/test_product_tags_code.py | 24 +++++++++--------- .../views/product_tag_views.xml | 0 product_template_tags_code/models/__init__.py | 1 - 19 files changed, 30 insertions(+), 30 deletions(-) rename {product_template_tags_code => product_tags_code}/README.rst (87%) rename {product_template_tags_code => product_tags_code}/__init__.py (100%) rename {product_template_tags_code => product_tags_code}/__manifest__.py (81%) rename {product_template_tags_code => product_tags_code}/i18n/es.po (100%) rename {product_template_tags_code => product_tags_code}/i18n/it.po (100%) rename product_template_tags_code/i18n/product_template_tags_code.pot => product_tags_code/i18n/product_tags_code.pot (100%) create mode 100644 product_tags_code/models/__init__.py rename product_template_tags_code/models/product_template_tag.py => product_tags_code/models/product_tag.py (95%) rename {product_template_tags_code => product_tags_code}/pyproject.toml (100%) rename {product_template_tags_code => product_tags_code}/readme/CONFIGURE.md (100%) rename {product_template_tags_code => product_tags_code}/readme/CONTRIBUTORS.md (100%) rename {product_template_tags_code => product_tags_code}/readme/CREDITS.md (100%) rename {product_template_tags_code => product_tags_code}/readme/DESCRIPTION.md (100%) rename {product_template_tags_code => product_tags_code}/static/description/icon.png (100%) rename {product_template_tags_code => product_tags_code}/static/description/index.html (91%) rename {product_template_tags_code => product_tags_code}/tests/__init__.py (69%) rename product_template_tags_code/tests/test_product_template_tags.py => product_tags_code/tests/test_product_tags_code.py (60%) rename product_template_tags_code/views/product_template_tag.xml => product_tags_code/views/product_tag_views.xml (100%) delete mode 100644 product_template_tags_code/models/__init__.py diff --git a/product_template_tags_code/README.rst b/product_tags_code/README.rst similarity index 87% rename from product_template_tags_code/README.rst rename to product_tags_code/README.rst index c56a264aa05..3c7bfe556ec 100644 --- a/product_template_tags_code/README.rst +++ b/product_tags_code/README.rst @@ -1,6 +1,6 @@ -===================== -Product Template Tags -===================== +================= +Product Tags Code +================= .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -17,10 +17,10 @@ Product Template Tags :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/18.0/product_template_tags_code + :target: https://github.com/OCA/product-attribute/tree/18.0/product_tags_code :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-18-0/product-attribute-18-0-product_template_tags_code + :target: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_tags_code :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=18.0 @@ -49,7 +49,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -94,6 +94,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 `_ project on GitHub. +This module is part of the `OCA/product-attribute `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_template_tags_code/__init__.py b/product_tags_code/__init__.py similarity index 100% rename from product_template_tags_code/__init__.py rename to product_tags_code/__init__.py diff --git a/product_template_tags_code/__manifest__.py b/product_tags_code/__manifest__.py similarity index 81% rename from product_template_tags_code/__manifest__.py rename to product_tags_code/__manifest__.py index 0371447d9e2..cbade93749a 100644 --- a/product_template_tags_code/__manifest__.py +++ b/product_tags_code/__manifest__.py @@ -2,12 +2,12 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { - "name": "Product Template Tags", + "name": "Product Tags Code", "summary": "This addon allow to add code on products tags", "version": "18.0.1.0.0", "license": "AGPL-3", "author": "Camptocamp SA, Odoo Community Association (OCA)", "website": "https://github.com/OCA/product-attribute", "depends": ["product"], - "data": ["views/product_template_tag.xml"], + "data": ["views/product_tag_views.xml"], } diff --git a/product_template_tags_code/i18n/es.po b/product_tags_code/i18n/es.po similarity index 100% rename from product_template_tags_code/i18n/es.po rename to product_tags_code/i18n/es.po diff --git a/product_template_tags_code/i18n/it.po b/product_tags_code/i18n/it.po similarity index 100% rename from product_template_tags_code/i18n/it.po rename to product_tags_code/i18n/it.po diff --git a/product_template_tags_code/i18n/product_template_tags_code.pot b/product_tags_code/i18n/product_tags_code.pot similarity index 100% rename from product_template_tags_code/i18n/product_template_tags_code.pot rename to product_tags_code/i18n/product_tags_code.pot diff --git a/product_tags_code/models/__init__.py b/product_tags_code/models/__init__.py new file mode 100644 index 00000000000..9eeecb86d32 --- /dev/null +++ b/product_tags_code/models/__init__.py @@ -0,0 +1 @@ +from . import product_tag diff --git a/product_template_tags_code/models/product_template_tag.py b/product_tags_code/models/product_tag.py similarity index 95% rename from product_template_tags_code/models/product_template_tag.py rename to product_tags_code/models/product_tag.py index 811a3b1812e..0f3ea6fa6c8 100644 --- a/product_template_tags_code/models/product_template_tag.py +++ b/product_tags_code/models/product_tag.py @@ -4,7 +4,7 @@ from odoo import api, fields, models -class ProductTemplateTag(models.Model): +class ProductTag(models.Model): _inherit = "product.tag" code = fields.Char( diff --git a/product_template_tags_code/pyproject.toml b/product_tags_code/pyproject.toml similarity index 100% rename from product_template_tags_code/pyproject.toml rename to product_tags_code/pyproject.toml diff --git a/product_template_tags_code/readme/CONFIGURE.md b/product_tags_code/readme/CONFIGURE.md similarity index 100% rename from product_template_tags_code/readme/CONFIGURE.md rename to product_tags_code/readme/CONFIGURE.md diff --git a/product_template_tags_code/readme/CONTRIBUTORS.md b/product_tags_code/readme/CONTRIBUTORS.md similarity index 100% rename from product_template_tags_code/readme/CONTRIBUTORS.md rename to product_tags_code/readme/CONTRIBUTORS.md diff --git a/product_template_tags_code/readme/CREDITS.md b/product_tags_code/readme/CREDITS.md similarity index 100% rename from product_template_tags_code/readme/CREDITS.md rename to product_tags_code/readme/CREDITS.md diff --git a/product_template_tags_code/readme/DESCRIPTION.md b/product_tags_code/readme/DESCRIPTION.md similarity index 100% rename from product_template_tags_code/readme/DESCRIPTION.md rename to product_tags_code/readme/DESCRIPTION.md diff --git a/product_template_tags_code/static/description/icon.png b/product_tags_code/static/description/icon.png similarity index 100% rename from product_template_tags_code/static/description/icon.png rename to product_tags_code/static/description/icon.png diff --git a/product_template_tags_code/static/description/index.html b/product_tags_code/static/description/index.html similarity index 91% rename from product_template_tags_code/static/description/index.html rename to product_tags_code/static/description/index.html index dc9f13adeb9..9634c933966 100644 --- a/product_template_tags_code/static/description/index.html +++ b/product_tags_code/static/description/index.html @@ -3,7 +3,7 @@ -Product Template Tags +Product Tags Code -
-

Product Template Tags

+
+

Product Tags Code

-

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

Allows to reference tag records trough a unique code.

Table of contents

@@ -398,7 +398,7 @@

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.

+feedback.

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

@@ -438,7 +438,7 @@

Maintainers

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 project on GitHub.

+

This module is part of the OCA/product-attribute project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/product_template_tags_code/tests/__init__.py b/product_tags_code/tests/__init__.py similarity index 69% rename from product_template_tags_code/tests/__init__.py rename to product_tags_code/tests/__init__.py index 2dc6a4f9a04..3d700ed3b3b 100644 --- a/product_template_tags_code/tests/__init__.py +++ b/product_tags_code/tests/__init__.py @@ -1,4 +1,4 @@ # Copyright 2020 Camptocamp # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from . import test_product_template_tags +from . import test_product_tags_code diff --git a/product_template_tags_code/tests/test_product_template_tags.py b/product_tags_code/tests/test_product_tags_code.py similarity index 60% rename from product_template_tags_code/tests/test_product_template_tags.py rename to product_tags_code/tests/test_product_tags_code.py index 7a3c5eaae28..81a4a414181 100644 --- a/product_template_tags_code/tests/test_product_template_tags.py +++ b/product_tags_code/tests/test_product_tags_code.py @@ -4,36 +4,36 @@ from odoo.addons.base.tests.common import BaseCommon -class TestProductTemplateTag(BaseCommon): +class TestProductTagsCode(BaseCommon): @classmethod def setUpClass(cls): super().setUpClass() cls.product_tmpl = cls.env["product.template"].create({"name": "Test Product"}) - def test_product_template_tag(self): - product_tmpl_tag = self.env["product.tag"].create( + def test_product_tags_code(self): + product_tag = self.env["product.tag"].create( { "name": "Test Tag", "product_template_ids": [(6, 0, [self.product_tmpl.id])], } ) - self.assertEqual(product_tmpl_tag.code, "test-tag") + self.assertEqual(product_tag.code, "test-tag") - def test_product_template_tag_writable(self): - product_tmpl_tag = self.env["product.tag"].create( + def test_product_tags_code_writable(self): + product_tag = self.env["product.tag"].create( { "name": "Test Tag", "code": "foo tag !!", "product_template_ids": [(6, 0, [self.product_tmpl.id])], } ) - self.assertEqual(product_tmpl_tag.code, "foo-tag") - product_tmpl_tag.write({"code": "test tag writable"}) - self.assertEqual(product_tmpl_tag.code, "test-tag-writable") - product_tmpl_tag.write({"name": "test tag name 2"}) - self.assertEqual(product_tmpl_tag.code, "test-tag-name-2") + self.assertEqual(product_tag.code, "foo-tag") + product_tag.write({"code": "test tag writable"}) + self.assertEqual(product_tag.code, "test-tag-writable") + product_tag.write({"name": "test tag name 2"}) + self.assertEqual(product_tag.code, "test-tag-name-2") - def test_product_template_multi_tags(self): + def test_product_multi_tags(self): prods_data = [] for x in range(3): prods_data.append( diff --git a/product_template_tags_code/views/product_template_tag.xml b/product_tags_code/views/product_tag_views.xml similarity index 100% rename from product_template_tags_code/views/product_template_tag.xml rename to product_tags_code/views/product_tag_views.xml diff --git a/product_template_tags_code/models/__init__.py b/product_template_tags_code/models/__init__.py deleted file mode 100644 index f542791c15d..00000000000 --- a/product_template_tags_code/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import product_template_tag