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

Module: Storage File

Entity: storage.file

Compute Method: _compute_data

View 19.0
Inputs Method Outputs
  • file_size
  • relative_path
  • backend_id
+ for rec in self:
+             if self._context.get("bin_size"):
+                 rec.data = rec.file_size
+             elif rec.relative_path:
+                 rec.data = rec.backend_id.sudo().get(rec.relative_path, binary=False)
+             else:
+                 rec.data = None
  • data

Back to entity