Skip to content
Health
78/100
good
  • Security25/25
    No findings
  • Activity20/25
    Last human commit 7 months ago
  • Required by15/25
    1 module depends on it
  • Maturity18/25
    In 3 Odoo series since 16.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
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
OCA/server-tools:
OCA/storage:
odoo/odoo:
- web
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 IDNameModelTypeStatus
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_id Many2one → ir.attachment
    comodel_name='ir.attachment' help='Attachment containing the original image' ondelete='cascade' required=True string='Attachment'
  • base_name Char
    help='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)'
  • mimetype Char
    compute='_compute_mimetype' store=True
  • name Char
    compute='_compute_name' store=True
  • size_x Integer
    required=True args: 'X size'
  • size_y Integer
    required=True args: 'Y size'
Public methods (2)
  • get_or_create_thumbnails(self, *images: <expr>, sizes: <expr>, base_name: str='') -> <expr>
    @api.model
    Get 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.model
    Get 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_ids One2many → fs.thumbnail
    comodel_name='fs.thumbnail' inverse_name='attachment_id' string='Thumbnails'
Public methods (0)

No public methods.

Loading…

Loading…