diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bfbe9ed..7d8c9b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,6 @@ exclude: | ^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/| ^shopinvader_search_engine_product_price/| diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e69de29..0000000 diff --git a/shopinvader_search_engine_product_brand_image/README.rst b/shopinvader_search_engine_product_brand_image/README.rst index 8f49777..e597571 100644 --- a/shopinvader_search_engine_product_brand_image/README.rst +++ b/shopinvader_search_engine_product_brand_image/README.rst @@ -16,15 +16,14 @@ Shopinvader Search Engine Product Brand Image .. |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_image - :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_image + :alt: shopinvader/odoo-shopinvader-search-engine |badge1| |badge2| |badge3| -This module allow you to manage synchronize image of brand on your `Shopinvader`_ website - -.. _Shopinvader: https://shopinvader.com +This module allow you to manage synchronize image of brand on your +`Shopinvader `__ website .. IMPORTANT:: This is an alpha version, the data model and design can change at any time without warning. @@ -39,10 +38,10 @@ This module allow you to manage synchronize image of brand on your `Shopinvader` 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. @@ -50,20 +49,20 @@ Credits ======= Authors -~~~~~~~ +------- * Akretion * ACSONE SA/NV Contributors -~~~~~~~~~~~~ +------------ -* Sebastien BEAU -* Marie LEJEUNE +- Sebastien BEAU +- 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_image/__manifest__.py b/shopinvader_search_engine_product_brand_image/__manifest__.py index e000430..977cefb 100644 --- a/shopinvader_search_engine_product_brand_image/__manifest__.py +++ b/shopinvader_search_engine_product_brand_image/__manifest__.py @@ -2,17 +2,16 @@ # @author Sébastien BEAU # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - { "name": "Shopinvader Search Engine Product Brand Image", "summary": "Shopinvader Search Engine product Brand Image", - "version": "16.0.1.0.0", + "version": "18.0.1.0.0", "category": "Shopinvader", "website": "https://github.com/shopinvader/odoo-shopinvader-search-engine", "author": " Akretion,ACSONE SA/NV", "license": "AGPL-3", "application": False, - "installable": False, + "installable": True, "depends": [ "shopinvader_product_brand", "shopinvader_search_engine_image", @@ -21,5 +20,4 @@ ], "data": [], "development_status": "Alpha", - "demo": [], } diff --git a/shopinvader_search_engine_product_brand_image/pyproject.toml b/shopinvader_search_engine_product_brand_image/pyproject.toml new file mode 100644 index 0000000..4231d0c --- /dev/null +++ b/shopinvader_search_engine_product_brand_image/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/shopinvader_search_engine_product_brand_image/readme/CONTRIBUTORS.md b/shopinvader_search_engine_product_brand_image/readme/CONTRIBUTORS.md new file mode 100644 index 0000000..8731666 --- /dev/null +++ b/shopinvader_search_engine_product_brand_image/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Sebastien BEAU \ +- Marie LEJEUNE \ diff --git a/shopinvader_search_engine_product_brand_image/readme/CONTRIBUTORS.rst b/shopinvader_search_engine_product_brand_image/readme/CONTRIBUTORS.rst deleted file mode 100644 index 01cbb7c..0000000 --- a/shopinvader_search_engine_product_brand_image/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,2 +0,0 @@ -* Sebastien BEAU -* Marie LEJEUNE diff --git a/shopinvader_search_engine_product_brand_image/readme/DESCRIPTION.md b/shopinvader_search_engine_product_brand_image/readme/DESCRIPTION.md new file mode 100644 index 0000000..31c5897 --- /dev/null +++ b/shopinvader_search_engine_product_brand_image/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module allow you to manage synchronize image of brand on your +[Shopinvader](https://shopinvader.com) website diff --git a/shopinvader_search_engine_product_brand_image/readme/DESCRIPTION.rst b/shopinvader_search_engine_product_brand_image/readme/DESCRIPTION.rst deleted file mode 100644 index ae99b87..0000000 --- a/shopinvader_search_engine_product_brand_image/readme/DESCRIPTION.rst +++ /dev/null @@ -1,3 +0,0 @@ -This module allow you to manage synchronize image of brand on your `Shopinvader`_ website - -.. _Shopinvader: https://shopinvader.com diff --git a/shopinvader_search_engine_product_brand_image/static/description/index.html b/shopinvader_search_engine_product_brand_image/static/description/index.html index 0f365f7..3698681 100644 --- a/shopinvader_search_engine_product_brand_image/static/description/index.html +++ b/shopinvader_search_engine_product_brand_image/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,8 +369,9 @@

Shopinvader Search Engine Product Brand Image

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:8a2f8395a165b4f71edb87f95f2c7f9dbba6ca375c05649989991084beb2b9ad !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Alpha License: AGPL-3 shopinvader/odoo-shopinvader

-

This module allow you to manage synchronize image of brand on your Shopinvader website

+

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

+

This module allow you to manage synchronize image of brand on your +Shopinvader website

Important

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

Shopinvader Search Engine Product Brand Image

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.

@@ -415,7 +416,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_image/tests/common.py b/shopinvader_search_engine_product_brand_image/tests/common.py index 613211b..b3b12ec 100644 --- a/shopinvader_search_engine_product_brand_image/tests/common.py +++ b/shopinvader_search_engine_product_brand_image/tests/common.py @@ -8,69 +8,71 @@ class ProductBrandImageCase(TestSeMultiImageThumbnailCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.backend.image_data_url_strategy = "odoo" + def setUp(self): + super().setUp() + self.backend.image_data_url_strategy = "odoo" + + def setup_records(self, backend=None): + rv = super().setup_records(backend=backend) # create index for brands - 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", } ) # create sizes for brands - cls.env["se.image.field.thumbnail.size"].create( + self.env["se.image.field.thumbnail.size"].create( { - "model_id": cls.env.ref("product_brand.model_product_brand").id, - "field_id": cls.env.ref( + "model_id": self.env.ref("product_brand.model_product_brand").id, + "field_id": self.env.ref( "fs_product_brand_multi_image.field_product_brand__image_ids" ).id, - "backend_id": cls.backend.id, - "size_ids": [(6, 0, [cls.size_small.id, cls.size_medium.id])], + "backend_id": self.backend.id, + "size_ids": [(6, 0, [self.size_small.id, self.size_medium.id])], } ) - cls.brand = cls.env["product.brand"].create( + self.brand = self.env["product.brand"].create( { "name": "Test Brand", } ) - cls.brand_white_image = cls.env["fs.product.brand.image"].create( + self.brand_white_image = self.env["fs.product.brand.image"].create( { "sequence": 1, - "brand_id": cls.brand.id, + "brand_id": self.brand.id, "specific_image": { "filename": "white.png", - "content": base64.b64encode(cls.white_image), + "content": base64.b64encode(self.white_image), }, - "tag_id": cls.tag1.id, + "tag_id": self.tag1.id, } ) - cls.brand_black_image = cls.env["fs.product.brand.image"].create( + self.brand_black_image = self.env["fs.product.brand.image"].create( { "sequence": 2, - "brand_id": cls.brand.id, + "brand_id": self.brand.id, "specific_image": { "filename": "black.png", - "content": base64.b64encode(cls.black_image), + "content": base64.b64encode(self.black_image), }, - "tag_id": cls.tag2.id, + "tag_id": self.tag2.id, } ) - cls.brand_binding = cls.brand._add_to_index(cls.brand_index) + self.brand_binding = self.brand._add_to_index(self.brand_index) - def setUp(self): - super().setUp() self.fs_storage = self.env["fs.storage"].create( { "name": "Temp FS Storage", "protocol": "memory", "code": "mem_dir_brand", "directory_path": "/tmp/", - "model_xmlids": "fs_product_brand_multi_image.model_fs_product_brand_image", + "model_xmlids": "fs_product_brand_multi_image." + "model_fs_product_brand_image", "base_url": "https://media.alcyonbelux.be/", "is_directory_path_in_url": False, } ) + return rv diff --git a/shopinvader_search_engine_product_brand_image/tests/test_brand.py b/shopinvader_search_engine_product_brand_image/tests/test_brand.py index 93ef1d0..3f2d06a 100644 --- a/shopinvader_search_engine_product_brand_image/tests/test_brand.py +++ b/shopinvader_search_engine_product_brand_image/tests/test_brand.py @@ -49,6 +49,7 @@ def test_brand_image_sequence(self): # we change the sequence of the images self.brand_white_image.sequence = 2 self.brand_black_image.sequence = 1 + self.brand.invalidate_recordset() # the order into the images field should be different, # the first image should be the black one with the tag "tag2" self.backend.image_data_url_strategy = "odoo" diff --git a/test-requirements.txt b/test-requirements.txt index f31697f..0b14531 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,22 @@ odoo-test-helper vcrpy-unittest + +odoo-addon-fs_image_thumbnail @ git+https://github.com/OCA/storage.git@refs/pull/470/head#subdirectory=fs_image_thumbnail +odoo-addon-fs_base_multi_image @ git+https://github.com/OCA/storage.git@refs/pull/506/head#subdirectory=fs_base_multi_image +odoo-addon-fs_product_multi_image @ git+https://github.com/OCA/storage.git@refs/pull/449/head#subdirectory=fs_product_multi_image +odoo-addon-fs_product_brand_multi_image @ git+https://github.com/OCA/storage.git@refs/pull/505/head#subdirectory=fs_product_brand_multi_image + +odoo-addon-search_engine_image_thumbnail @ git+https://github.com/OCA/search-engine.git@refs/pull/228/head#subdirectory=search_engine_image_thumbnail + +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_base_url @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/1/head#subdirectory=shopinvader_base_url +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_product_brand @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/6/head#subdirectory=shopinvader_product_brand + + +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_search_engine_product_brand @ git+https://github.com/shopinvader/odoo-shopinvader-search-engine@refs/pull/6/head#subdirectory=shopinvader_search_engine_product_brand +odoo-addon-shopinvader_search_engine_image @ git+https://github.com/shopinvader/odoo-shopinvader-search-engine@refs/pull/8/head#subdirectory=shopinvader_search_engine_image