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

Module: Attachment Synchronize

Entity: attachment.synchronize.task

Compute Method: _compute_count_state

View 18.0
Inputs Method Outputs
  • attachment_ids
- for record in self:
-             for state in ["failed", "pending", "done"]:
-                 record[f"count_attachment_{state}"] = len(
-                     record.attachment_ids.filtered(lambda r, st=state: r.state == st)
-                 )

Back to entity