Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ addon | version | maintainers | summary
[storage_backend_sftp](storage_backend_sftp/) | 18.0.1.0.0 | | Implement SFTP Storage
[storage_file](storage_file/) | 18.0.1.0.0 | | Storage file in storage backend
[storage_image](storage_image/) | 18.0.1.0.1 | | Store image and resized image in a storage backend
[storage_image_product](storage_image_product/) | 18.0.1.0.1 | | Link images to products and categories
[storage_image_product](storage_image_product/) | 18.0.1.0.2 | | Link images to products and categories
[storage_media](storage_media/) | 18.0.1.1.1 | | Give the posibility to store media data in Odoo
[storage_media_product](storage_media_product/) | 18.0.1.0.1 | | Link media to products and categories
[storage_thumbnail](storage_thumbnail/) | 18.0.1.0.0 | | Abstract module that add the possibility to have thumbnail
Expand Down
2 changes: 1 addition & 1 deletion storage_image_product/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Storage Image Product
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7417948de53286309bdc23535830b7a81e6f5f21fc592be94b370fa9adce89ea
!! source digest: sha256:da4b914be20e01a01cfa782549a9aeab2ac2a946a96895fce85de92e6f2b454c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
2 changes: 1 addition & 1 deletion storage_image_product/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Storage Image Product",
"summary": "Link images to products and categories",
"version": "18.0.1.0.1",
"version": "18.0.1.0.2",
"category": "Storage",
"website": "https://github.com/OCA/storage",
"author": " Akretion, Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion storage_image_product/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Storage Image Product</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7417948de53286309bdc23535830b7a81e6f5f21fc592be94b370fa9adce89ea
!! source digest: sha256:da4b914be20e01a01cfa782549a9aeab2ac2a946a96895fce85de92e6f2b454c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/storage/tree/18.0/storage_image_product"><img alt="OCA/storage" src="https://img.shields.io/badge/github-OCA%2Fstorage-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/storage-18-0/storage-18-0-storage_image_product"><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/storage&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Attach images to products and categories</p>
Expand Down
12 changes: 9 additions & 3 deletions storage_image_product/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from odoo.addons.component.tests.common import TransactionComponentCase


class ProductImageCommonCase(TransactionComponentCase):
class ProductImageCaseMixin:
@staticmethod
def _get_file_content(name, base_path=None, as_binary=False):
path = base_path or os.path.dirname(os.path.abspath(__file__))
Expand All @@ -25,12 +25,18 @@ def _create_storage_image(cls, name):
)

@classmethod
def setUpClass(cls):
super().setUpClass()
def _setup_base_image_data(cls):
cls.template = cls.env.ref("product.product_product_4_product_template")
cls.product_a = cls.env.ref("product.product_product_4")
cls.product_b = cls.env.ref("product.product_product_4b")
cls.product_c = cls.env.ref("product.product_product_4c")
cls.logo_image = cls._create_storage_image("logo-image.jpg")
cls.white_image = cls._create_storage_image("white-image.jpg")
cls.black_image = cls._create_storage_image("black-image.jpg")


class ProductImageCommonCase(TransactionComponentCase, ProductImageCaseMixin):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls._setup_base_image_data()
Loading