Skip to content

[18] fs_attachment_s3 Product Images remain after deletion #547

@TwinkieXLII

Description

@TwinkieXLII

When Product Image is deleted the files remain in the S3 store. They are not deleted.

Module

fs_storage, fs_attachment

Describe the bug

My Odoo site is configure with S3 compatible storage (wasabi) and also configured to be the "Default for Attachments". Force Db For Default Attachment Rules is using the default set of rules.
When an image is added to a product, then removed. The old image remains stored in the S3 storage, it's not removed. While this doesn't break the functionality of the site, it does represent storage leaking, where the product images that are remove are not cleaned up out of the s3 storage.

To Reproduce

18.0.1

Steps to reproduce the behavior:

  1. Install fs_storage
  2. install fs_attachment
  3. install fs_attachment_se
  4. Configure storage
  5. add image to product
  6. check S3 for object existence
  7. remove image from product
  8. S3 Object Remains

Expected behavior
When product image is removed, Object should be deleted from storage.

Additional context
Odoo 18 CE, clean install. 18.0 63ccff8bb2
s3fs 2025.12.0
fsspec 2025.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions