diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bfbe9ed..2fc705d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,6 @@ exclude: | ^shopinvader_search_engine/| ^shopinvader_search_engine_assortment/| ^shopinvader_search_engine_image/| - ^shopinvader_search_engine_product_brand/| ^shopinvader_search_engine_product_brand_image/| ^shopinvader_search_engine_product_media/| ^shopinvader_search_engine_product_multi_price/| diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e69de29..0000000 diff --git a/shopinvader_search_engine_product_brand/README.rst b/shopinvader_search_engine_product_brand/README.rst index b932120..5c6a048 100644 --- a/shopinvader_search_engine_product_brand/README.rst +++ b/shopinvader_search_engine_product_brand/README.rst @@ -16,16 +16,17 @@ Shopinvader Search Engine Product Brand .. |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-shopinvader%2Fodoo--shopinvader-lightgray.png?logo=github - :target: https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_search_engine_product_brand - :alt: shopinvader/odoo-shopinvader +.. |badge3| image:: https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader--search--engine-lightgray.png?logo=github + :target: https://github.com/shopinvader/odoo-shopinvader-search-engine/tree/18.0/shopinvader_search_engine_product_brand + :alt: shopinvader/odoo-shopinvader-search-engine |badge1| |badge2| |badge3| -This module makes your *product.brand* model exportable to a search engine. It -defines an register a specific serializer for this model to be used when configuring -your indexes into odoo. This serializer is based on a Pydantic model defined -by the *shopinvader_product_brand* module. +This module makes your *product.brand* model exportable to a search +engine. It defines an register a specific serializer for this model to +be used when configuring your indexes into odoo. This serializer is +based on a Pydantic model defined by the *shopinvader_product_brand* +module. .. IMPORTANT:: This is an alpha version, the data model and design can change at any time without warning. @@ -40,10 +41,10 @@ by the *shopinvader_product_brand* module. Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +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. @@ -51,18 +52,18 @@ Credits ======= Authors -~~~~~~~ +------- * ACSONE SA/NV Contributors -~~~~~~~~~~~~ +------------ -* Marie Lejeune +- Marie Lejeune Maintainers -~~~~~~~~~~~ +----------- -This module is part of the `shopinvader/odoo-shopinvader `_ project on GitHub. +This module is part of the `shopinvader/odoo-shopinvader-search-engine `_ project on GitHub. You are welcome to contribute. diff --git a/shopinvader_search_engine_product_brand/__manifest__.py b/shopinvader_search_engine_product_brand/__manifest__.py index ef579be..5e5fbcb 100644 --- a/shopinvader_search_engine_product_brand/__manifest__.py +++ b/shopinvader_search_engine_product_brand/__manifest__.py @@ -2,22 +2,20 @@ # @author Marie LEJEUNE # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - { "name": "Shopinvader Search Engine Product Brand", "summary": "Shopinvader Search Engine Product Brand", - "version": "16.0.1.0.1", + "version": "18.0.1.0.0", "category": "Shopinvader", "website": "https://github.com/shopinvader/odoo-shopinvader-search-engine", "author": " ACSONE SA/NV", "license": "AGPL-3", "application": False, - "installable": False, + "installable": True, "depends": [ "shopinvader_product_brand", "shopinvader_search_engine", ], "data": [], - "demo": [], "development_status": "Alpha", } diff --git a/shopinvader_search_engine_product_brand/models/se_index.py b/shopinvader_search_engine_product_brand/models/se_index.py index 6fa91ca..4711751 100644 --- a/shopinvader_search_engine_product_brand/models/se_index.py +++ b/shopinvader_search_engine_product_brand/models/se_index.py @@ -1,6 +1,6 @@ # Copyright 2023 ACSONE SA/NV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import _, api, fields, models +from odoo import api, fields, models from odoo.exceptions import ValidationError from ..tools.brand_serializer import ProductBrandShopinvaderSerializer @@ -28,7 +28,9 @@ def _check_model(self): se_index.serializer_type == "shopinvader_brand_exports" and se_index.model_id != brand_model ): - raise ValidationError(_("'Serializer Type' must match 'Model'")) + raise ValidationError( + self.env._("'Serializer Type' must match 'Model'") + ) def _get_serializer(self): self.ensure_one() diff --git a/shopinvader_search_engine_product_brand/pyproject.toml b/shopinvader_search_engine_product_brand/pyproject.toml new file mode 100644 index 0000000..4231d0c --- /dev/null +++ b/shopinvader_search_engine_product_brand/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/shopinvader_search_engine_product_brand/readme/CONTRIBUTORS.md b/shopinvader_search_engine_product_brand/readme/CONTRIBUTORS.md new file mode 100644 index 0000000..cebee75 --- /dev/null +++ b/shopinvader_search_engine_product_brand/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Marie Lejeune \ diff --git a/shopinvader_search_engine_product_brand/readme/CONTRIBUTORS.rst b/shopinvader_search_engine_product_brand/readme/CONTRIBUTORS.rst deleted file mode 100644 index fa723c2..0000000 --- a/shopinvader_search_engine_product_brand/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1 +0,0 @@ -* Marie Lejeune diff --git a/shopinvader_search_engine_product_brand/readme/DESCRIPTION.md b/shopinvader_search_engine_product_brand/readme/DESCRIPTION.md new file mode 100644 index 0000000..dda5ac0 --- /dev/null +++ b/shopinvader_search_engine_product_brand/readme/DESCRIPTION.md @@ -0,0 +1,5 @@ +This module makes your *product.brand* model exportable to a search +engine. It defines an register a specific serializer for this model to +be used when configuring your indexes into odoo. This serializer is +based on a Pydantic model defined by the *shopinvader_product_brand* +module. diff --git a/shopinvader_search_engine_product_brand/readme/DESCRIPTION.rst b/shopinvader_search_engine_product_brand/readme/DESCRIPTION.rst deleted file mode 100644 index 01604a2..0000000 --- a/shopinvader_search_engine_product_brand/readme/DESCRIPTION.rst +++ /dev/null @@ -1,4 +0,0 @@ -This module makes your *product.brand* model exportable to a search engine. It -defines an register a specific serializer for this model to be used when configuring -your indexes into odoo. This serializer is based on a Pydantic model defined -by the *shopinvader_product_brand* module. diff --git a/shopinvader_search_engine_product_brand/static/description/index.html b/shopinvader_search_engine_product_brand/static/description/index.html index 0a834f7..856a3bb 100644 --- a/shopinvader_search_engine_product_brand/static/description/index.html +++ b/shopinvader_search_engine_product_brand/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,11 +369,12 @@

Shopinvader Search Engine Product Brand

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:05a360fa699673ac8c07d357ae6d1d9bda733e7ac4a64d71935a5a18f349e4c6 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Alpha License: AGPL-3 shopinvader/odoo-shopinvader

-

This module makes your product.brand model exportable to a search engine. It -defines an register a specific serializer for this model to be used when configuring -your indexes into odoo. This serializer is based on a Pydantic model defined -by the shopinvader_product_brand module.

+

Alpha License: AGPL-3 shopinvader/odoo-shopinvader-search-engine

+

This module makes your product.brand model exportable to a search +engine. It defines an register a specific serializer for this model to +be used when configuring your indexes into odoo. This serializer is +based on a Pydantic model defined by the shopinvader_product_brand +module.

Important

This is an alpha version, the data model and design can change at any time without warning. @@ -394,10 +395,10 @@

Shopinvader Search Engine Product Brand

Bug Tracker

-

Bugs are tracked on GitHub Issues. +

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.

@@ -416,7 +417,7 @@

Contributors

Maintainers

-

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

+

This module is part of the shopinvader/odoo-shopinvader-search-engine project on GitHub.

You are welcome to contribute.

diff --git a/shopinvader_search_engine_product_brand/tests/test_search_engine_product_brand.py b/shopinvader_search_engine_product_brand/tests/test_search_engine_product_brand.py index 9c087fe..3d2fb1e 100644 --- a/shopinvader_search_engine_product_brand/tests/test_search_engine_product_brand.py +++ b/shopinvader_search_engine_product_brand/tests/test_search_engine_product_brand.py @@ -5,20 +5,20 @@ class TestBrandBinding(TestBindingIndexBase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.brand = cls.env["product.brand"].create({"name": "Test Brand"}) + def setup_records(self, backend=None): + rv = super().setup_records(backend=backend) + self.brand = self.env["product.brand"].create({"name": "Test Brand"}) # create index for brand - cls.brand_index = cls.env["se.index"].create( + self.brand_index = self.env["se.index"].create( { "name": "brand", - "backend_id": cls.backend.id, - "model_id": cls.env.ref("product_brand.model_product_brand").id, + "backend_id": self.backend.id, + "model_id": self.env.ref("product_brand.model_product_brand").id, "serializer_type": "shopinvader_brand_exports", } ) - cls.brand_binding = cls.brand._add_to_index(cls.brand_index) + self.brand_binding = self.brand._add_to_index(self.brand_index) + return rv def test_product_brand(self): brand = self.brand_binding._contextualize(self.brand_binding) diff --git a/test-requirements.txt b/test-requirements.txt index f31697f..4f1a169 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,11 @@ odoo-test-helper vcrpy-unittest + +odoo-addon-product_category_name_translatable @ git+https://github.com/OCA/product-attribute@refs/pull/2130/head#subdirectory=product_category_name_translatable +odoo-addon-shopinvader_product @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/2/head#subdirectory=shopinvader_product +odoo-addon-shopinvader_product_seo @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/5/head#subdirectory=shopinvader_product_seo + +odoo-addon-shopinvader_search_engine @ git+https://github.com/shopinvader/odoo-shopinvader-search-engine@refs/pull/2/head#subdirectory=shopinvader_search_engine + +odoo-addon-shopinvader_base_url @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/1/head#subdirectory=shopinvader_base_url +odoo-addon-shopinvader_product_brand @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/6/head#subdirectory=shopinvader_product_brand