Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Pos Attachment
Entity: pos.order
Compute Method: _compute_attachment_ids
| Inputs | Method | Outputs |
|---|---|---|
|
- for order in self: - attachment_ids = ( - self.env["ir.attachment"] - .search([("res_model", "=", "pos.order"), ("res_id", "=", order.id)]) - .ids - ) - message_attachment_ids = order.mapped("message_ids.attachment_ids").ids - order.attachment_ids = [ - (6, 0, list(set(attachment_ids) - set(message_attachment_ids))) - ] |
|
