TIP: You can type at any time to perform a new search.
Fs Image Thumbnail
fs_image_thumbnail · OCA/storage
- Repository
- OCA/storage · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Uncategorized
- Folder size
- 0.08 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/storage
- Last tracking update
- 2026-08-07 08:42:56
- Authors
- ACSONE SA/NV, Odoo Community Association (OCA)
- Maintainers
- ACSONE SA/NV, Odoo Community Association (OCA)
- Committers
- Sébastien BEAU, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- python_slugify, fsspec>=2025.3.0, fsspec>=2024.5.0
- System dependencies
- None
- Required by
- search_engine_image_thumbnail
- Description
This module extends the **fs_image** addon to support the creation and the storage of thumbnails for images. This module is a **technical module** and is not meant to be installed by end-users. It only provides a mixin to be used by other modules and a model to store the thumbnails.
Code Analysis ⓘ
Views touched (7)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
fs_image_thumbnail_mixin_form_view |
fs.image.thumbnail.mixin.form (in fs_image_thumbnail) | fs.image.thumbnail.mixin | form | New |
fs_image_thumbnail_mixin_search_view |
fs.image.thumbnail.mixin.search (in fs_image_thumbnail) | fs.image.thumbnail.mixin | search | New |
fs_image_thumbnail_mixin_tree_view |
fs.image.thumbnail.mixin.list (in fs_image_thumbnail) | fs.image.thumbnail.mixin | list | New |
fs_thumbnail_form_view |
fs.thumbnail.form | fs.thumbnail | form | Inherits fs_image_thumbnail_mixin_form_view |
fs_thumbnail_search_view |
fs.thumbnail.search | fs.thumbnail | search | Inherits fs_image_thumbnail_mixin_search_view |
fs_thumbnail_tree_view |
fs.thumbnail.list | fs.thumbnail | list | Inherits fs_image_thumbnail_mixin_tree_view |
ir_attachment_form_view |
ir.attachment.form (in fs_image_thumbnail) | ir.attachment | form | Inherits base.view_attachment_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (3)
New fields (6)
-
attachment_idMany2one → ir.attachmentcomodel_name='ir.attachment'help='Attachment containing the original image'ondelete='cascade'required=Truestring='Attachment' -
base_nameCharhelp='The thumbnail image will be named as base_name + _ + size_x + _ + size_y + . + extension.\nIf not set, the base name will be the name of the original image.This base name is used to find all existing thumbnail of an image generated for the same base name.'required=True args: 'The base name of the thumbnail image (without extension)' -
mimetypeCharcompute='_compute_mimetype'store=True -
nameCharcompute='_compute_name'store=True -
size_xIntegerrequired=True args: 'X size' -
size_yIntegerrequired=True args: 'Y size'
-
get_or_create_thumbnails(self, *images: <expr>, sizes: <expr>, base_name: str='') -> <expr>@api.modelGet or create a thumbnail images from the given image. :param images: the list of images we want to get or create thumbnails :param sizes: the list of sizes to use to resize the image (list of tuple (size_x, size_y)) :param base_name: the base name of the thumbnail image (without extension) The base name must be set when multiple images are given. :return: an ordered dictionary where the key is the original image and the value is a recordset of thumbnail images. The order of the dict is the order of the images passed to the method. -
get_thumbnails(self, *images: <expr>, base_name: str='') -> <expr>@api.modelGet existing thumbnail images from the given image. :param images: a list of images we want to find existing thumbnails :param base_name: the base name of the thumbnail image (without extension) The base name must be set when multiple images are given. :return: a recordset of thumbnail images
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
thumbnail_idsOne2many → fs.thumbnailcomodel_name='fs.thumbnail'inverse_name='attachment_id'string='Thumbnails'
No public methods.
Loading…
Loading…