[FIX] attachment_indexation: avoid indexing attachment on copy

closes odoo/odoo#153422

X-original-commit: 0e268381ea7fde2154af8a4aadc4233f7eb2cec0
Signed-off-by: Raphael Collet <rco@odoo.com>
This commit is contained in:
Stanislas Sobieski
2024-02-12 20:24:09 +00:00
parent f3eb6f395a
commit 96703da336
@@ -140,3 +140,7 @@ class IrAttachment(models.Model):
if checksum:
index_content_cache[checksum] = res
return res
def copy(self, default=None):
index_content_cache[self.checksum] = self.index_content
return super().copy(default=default)