According to this answer: what does attachment=True do odoo 13
When you do self.env['ir.attachment'].search([])
you do not get the records whose res_field
is set, which commonly are the most part of the table, by the way.
Of course, I need to get records that do have the res_id
field set. Is there a hack to do it through the ORM
search?
Or do I have to do a SQL query instead? I guess many of you needed to do this once. Any good idea to respect ORM?