Attachment Cleaner
Orphans, redundant copies, filestore size — and a purge that leaves a trail.
A database's filestore ages badly. Migrations, cascading deletions at the database level and failed imports leave behind attachments that no longer point to anything. Odoo offers no inventory of them, and its automatic cleanup only touches what it produced itself.
What it adds
- ๐ A report before anything else — the module counts, weighs and names; it only deletes on a second action.
- ๐งท Two criteria, no more — orphans, and redundant copies on the same document. The same file on two different documents is never touched: a template contract attached to two customers must stay that way.
- ๐ก๏ธ An explicit safety net — binary field values, files served by a URL, public attachments, views, and anything more recent than the minimum age: never offered.
- ๐งพ Every purge leaves its trail — who, when, how many attachments, how many bytes, on which criteria, and the list of deleted files.
Real screenshots
1. The report, before any deletion
Five orphans and two redundant copies, listed one by one with their source document and size. The total filestore size is shown alongside, so you can measure what the purge would really change.
2. What was purged, and by whom
Every purge is archived: the question "who deleted these files?" never goes unanswered.
Why install it
- The purge replays the report instead of trusting the saved selection: in between, the database kept on living.
- An attachment whose model disappeared along with its module is not flagged as an orphan: reinstalling the module would make it useful again, and a purge cannot be undone.
- Open source module, LGPL-3 license — no subscription, no external dependency.
Going further
Cleaning attachments is maintenance; organizing them is a job in itself. The OdooSkills range offers full document management — filing, versions, per-folder access rights, electronic signature. Full catalog: apps.odooskills.com.
LGPL-3 license — compatible with Odoo 19.0 Community and Enterprise. Support: apps@odooskills.com.