Repository
OCA/server-tools · module folder · Try on Runboat
Module version
1.0.0
Category
Misc
Folder size
0.05 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/server-tools
Last tracking update
2026-08-07 08:42:58
Authors
Camptocamp, Odoo Community Association (OCA)
Maintainers
Camptocamp, Odoo Community Association (OCA)
Committers
OCA-git-bot, oca-ci, Bhavesh Heliconia
Odoo dependencies
odoo/odoo:
Python dependencies
None
System dependencies
None
Required by
None
Description
This module extends the functionality of any model to support
conditional images (based on the record attributes) and to manage them
either globally or by company.

The main goal behind this module is to avoid storing the same image
multiple times. For example, for every partner, there is a related image
(most of the time, it's the default one). With this module properly set
up, it will be stored only one time and you can change it whenever you
want for all partners.

**WARNING**: this module cannot be used on the same objects using the
module base_multi_image.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
view_conditional_image_form conditional.image.form conditional.image form New
view_conditional_image_tree conditional.image.tree conditional.image list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (2)

New fields (4)
  • company_id Many2one → res.company
    help='Company related check. If inherited object does not have a `company_id` field, it will be ignored. The check will first take the records with a company then, if no match is found, the ones without a company.' args: 'res.company', 'Company'
  • model_name Char
    required=True
  • name Char
    required=True
  • selector Text
    help='Python expression used as selector when multiple images are usedfor the same object. The variable `object` refers to the actual record on which the expression will be executed. An empty expression will always return `True`.'
Public methods (0)

No public methods.

New fields (5)
  • image_1024 Image
    compute='_compute_images' readonly=True store=False
  • image_128 Image
    compute='_compute_images' readonly=True store=False
  • image_1920 Image
    compute='_compute_images' readonly=True store=False
  • image_256 Image
    compute='_compute_images' readonly=True store=False
  • image_512 Image
    compute='_compute_images' readonly=True store=False
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…