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

Module: Base

Entity: ir.attachment

Compute Method: _compute_raw

View 19.0 View 20.0
Inputs Method Outputs
  • store_fname
  • db_datas
  • name
for attach in self:
            if attach.store_fname:
-                 attach.raw = attach._file_read(attach.store_fname)
+                 raw = attach._file_read()
            else:
-                 attach.raw = attach.db_datas
+                 raw = BinaryBytes(attach.db_datas, filename=attach.name)
+             attach.raw = raw
  • raw

Back to entity