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_datas

View 17.0 View 19.0
Inputs Method Outputs
  • file_size
  • raw
- if self._context.get('bin_size'):
+ if self.env.context.get('bin_size'):
            for attach in self:
                attach.datas = human_size(attach.file_size)
            return
for attach in self:
            attach.datas = base64.b64encode(attach.raw or b'')
  • datas

Back to entity