Add ``lib/python/file_gc.py``, a minimal Odoo-shell script that calls ``ir.attachment._gc_file_store_unsafe()`` to remove filestore files no longer referenced by any ``ir_attachment`` record. Invoke it in ``finalize_db.sh`` after the SQL attachment purges so that the deleted CSS/JS asset bundles, resized partner thumbnails, and orphaned ``ir_attachment`` rows also have their backing files cleaned from disk.
2 lines
45 B
Python
2 lines
45 B
Python
env['ir.attachment']._gc_file_store_unsafe()
|