From 17a924f862e15c536ed6e2820f2aa4ccaed67f3c Mon Sep 17 00:00:00 2001 From: Denis Leemann Date: Tue, 22 Aug 2023 14:57:55 +0200 Subject: [PATCH] base_attachment_storage: _register_hook do nothing if it is disabled --- base_attachment_object_storage/models/ir_attachment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_attachment_object_storage/models/ir_attachment.py b/base_attachment_object_storage/models/ir_attachment.py index e8b17f5..93408ec 100644 --- a/base_attachment_object_storage/models/ir_attachment.py +++ b/base_attachment_object_storage/models/ir_attachment.py @@ -79,7 +79,7 @@ class IrAttachment(models.Model): # migration here. # Typical example is images of ir.ui.menu which are updated in # ir.attachment at every upgrade of the addons - if update_module: + if update_module and not self.is_storage_disabled(location): self.env["ir.attachment"].sudo()._force_storage_to_object_storage() @property