From 1e91160f83aaad30b424439a50065f20b84927f7 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 13 Oct 2022 09:57:04 +0700 Subject: override ir attachment for exclude gc filestore --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/ir_attachment.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 indoteknik_custom/models/ir_attachment.py diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 415cd380..138321c6 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -26,3 +26,4 @@ from . import stock_picking_type from . import delivery_order from . import product_pricelist from . import users +from . import ir_attachment diff --git a/indoteknik_custom/models/ir_attachment.py b/indoteknik_custom/models/ir_attachment.py new file mode 100644 index 00000000..278eb938 --- /dev/null +++ b/indoteknik_custom/models/ir_attachment.py @@ -0,0 +1,12 @@ +from odoo import api, fields, models, _ +import logging + +_logger = logging.getLogger(__name__) + + +class Attachment(models.Model): + _inherit = 'ir.attachment' + + @api.autovacuum + def _gc_file_store(self): + _logger.info("filestore gc checked, removed - override") \ No newline at end of file -- cgit v1.2.3