[FIX] base: count attachment correctly
Since _search return a query object, we cannot slice it. So we listify it. Thanks to XMO and RYV for their very valuable input. closes odoo/odoo#122589 X-original-commit: 2e51b638232aff90405f318abb849f8b8db38496 Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit is contained in:
@@ -579,7 +579,7 @@ class IrAttachment(models.Model):
|
||||
more_ids = self.with_context(need=need)._search(
|
||||
domain, offset + len(all_ids), limit, order, access_rights_uid,
|
||||
)
|
||||
result.extend(more_ids[:limit - len(result)])
|
||||
result.extend(list(more_ids)[:limit - len(result)])
|
||||
|
||||
return self.browse(result)._as_query(order)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user