Coverage for ingadhoc-odoo-saas / saas_client / models / ir_attachment.py: 58%
18 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-09 18:05 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-09 18:05 +0000
1import os
3from odoo import api, models
6class IrAttachment(models.Model):
7 _inherit = "ir.attachment"
9 @api.autovacuum
10 def _gc_file_store(self):
11 assert isinstance(self, IrAttachment)
12 if os.environ.get("ADHOC_ODOO_STORAGE_MODE") == "fuse":
13 return
14 super()._gc_file_store()
16 def _mark_for_gc(self, fname):
17 if os.environ.get("ADHOC_ODOO_STORAGE_MODE") == "fuse": 17 ↛ 18line 17 didn't jump to line 18 because the condition on line 17 was never true
18 return
19 super()._mark_for_gc(fname)
21 def _gc_file_store_unsafe(self):
22 if os.environ.get("ADHOC_ODOO_STORAGE_MODE") == "fuse": 22 ↛ 23line 22 didn't jump to line 23 because the condition on line 22 was never true
23 return
24 super()._gc_file_store_unsafe()