Fs Image Thumbnail
fs_image_thumbnail · OCA/storage
Health
78/100
good
-
Security25/25No findings
-
Activity20/25Last human commit 7 months ago
-
Required by15/251 module depends on it
-
Maturity18/25In 3 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
Required by
1
Modules depending on it
External deps
3 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.08 MB
Module directory on disk
Code analysis
0 migration notes
3 models
7 views
0 HTTP endpoints
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.
Dependencies
- Odoo dependencies
- Python dependencies
- python_slugify, fsspec>=2025.3.0, fsspec>=2024.5.0
- System dependencies
- None
- Required by
- search_engine_image_thumbnail
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
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…