Repository
OCA/storage · module folder · Try on Runboat
Module version
1.0.0
Category
Storage
Folder size
0.06 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/storage
Last tracking update
2026-08-07 09:06:25
Authors
Akretion, Odoo Community Association (OCA)
Maintainers
Akretion, Odoo Community Association (OCA)
Committers
Stéphane Bidoul, Laurent Mignon (ACSONE)
Odoo dependencies
OCA/connector:
OCA/server-env:
OCA/storage:
odoo/odoo:
Python dependencies
python_slugify, cachetools
System dependencies
None
Required by
storage_image, storage_media
Description
External image thumbnail management depending on Storage File module.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
view_thumbnail_form storage.thumbnail form New
view_thumbnail_tree storage.thumbnail list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (3)

New fields (1)
  • file_type Selection
    ondelete={'thumbnail': 'set null'} selection_add=[('thumbnail', 'Thumbnail')]
Public methods (0)

No public methods.

New fields (6)
  • file_id Many2one → storage.file
    ondelete='cascade' required=True args: 'storage.file', 'File'
  • res_id Integer
    index=True readonly=False
  • res_model Char
    index=True readonly=False
  • size_x Integer
    args: 'X size'
  • size_y Integer
    args: 'Y size'
  • url_key Char
    help='Specific URL key for generating the url of the image'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)

New fields (5)
  • image_medium_url Char
    compute='_compute_thumb_urls' compute_sudo=True string='Medium thumb URL'
  • image_small_url Char
    compute='_compute_thumb_urls' compute_sudo=True string='Small thumb URL'
  • thumb_medium_id Many2one → storage.thumbnail
    comodel_name='storage.thumbnail' compute='_compute_main_thumbs' compute_sudo=True readonly=False store=True
  • thumb_small_id Many2one → storage.thumbnail
    comodel_name='storage.thumbnail' compute='_compute_main_thumbs' compute_sudo=True readonly=False store=True
  • thumbnail_ids One2many → storage.thumbnail
    comodel_name='storage.thumbnail' domain=<expr> inverse_name='res_id' string='Thumbnails'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • generate_odoo_thumbnail(self)
  • get_existing_thumbnail(self, size_x, size_y, url_key=None)
  • get_or_create_thumbnail(self, size_x, size_y, url_key=None)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…