Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: HTML Editor
Entity: ir.attachment
Compute Method: _compute_image_size
| Inputs | Method | Outputs |
|---|---|---|
|
+ for attachment in self: + try: + image = binary_to_image(attachment.raw or b'') + attachment.image_width = image.width + attachment.image_height = image.height + except UserError: + attachment.image_width = 0 + attachment.image_height = 0 |
|
