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

Module: Fs Base Multi Media

Entity: fs.media.relation.mixin

Compute Method: _compute_media

View 17.0
Inputs Method Outputs
  • link_existing
  • media_id
  • media_id.file
  • media_id.media_type_id
  • specific_file
  • specific_media_type_id
- for record in self:
-             if record.link_existing:
-                 record.file = record.media_id.file
-                 record.media_type_id = record.media_id.media_type_id
-             else:
-                 record.file = record.specific_file
-                 record.media_type_id = record.specific_media_type_id
  • file
  • media_type_id

Back to entity