Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Document Management System

Entity: dms.mixins.thumbnail

Compute Method: _compute_icon_url

Inputs Method Outputs
  • image_128
  • id
"""Get icon static file URL."""
for one in self:
            # Get URL to thumbnail or to the default icon by file extension
            one.icon_url = (
                f"/web/image/{one._name}/{one.id}/image_128/128x128?crop=1"
                if one.image_128
                else f"{one._get_icon_url()}?crop=1"
            )

Back to entity