diff --git a/README.md b/README.md index c83efd8cf0..f8015efae5 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ addon | version | maintainers | summary [fs_folder_ms_drive](fs_folder_ms_drive/) | 18.0.2.0.0 | lmignon | Display and manage your files from Microsoft drives from within Odoo [fs_folder_webdav](fs_folder_webdav/) | 18.0.1.0.0 | jguenat | UI improvement when managing WebDAV folder [fs_image](fs_image/) | 18.0.1.0.0 | lmignon | Field to store images into filesystem storages -[fs_storage](fs_storage/) | 18.0.2.1.0 | | Implement the concept of Storage with amazon S3, sftp... +[fs_storage](fs_storage/) | 18.0.2.1.1 | | Implement the concept of Storage with amazon S3, sftp... [fs_storage_ms_drive](fs_storage_ms_drive/) | 18.0.2.0.0 | lmignon | Add the microsoft drives (OneDrive, Sharepoint) as a storage backend [image_tag](image_tag/) | 18.0.1.0.0 | | Image tag model [microsoft_drive_account](microsoft_drive_account/) | 18.0.2.0.0 | lmignon | Link user with Microsoft diff --git a/fs_file/tests/test_fs_file.py b/fs_file/tests/test_fs_file.py index 7edb143efd..0e6e02c66a 100644 --- a/fs_file/tests/test_fs_file.py +++ b/fs_file/tests/test_fs_file.py @@ -40,6 +40,11 @@ def setUpClass(cls): def setUp(self): super().setUp() + # Remove check_attrs cleanup if exists to avoid conflict with FakeModelLoader. + # since superClass uses it for its own puposes not relevant for our tests. + check_attrs = (getattr(self, "check_attrs", None), tuple(), {}) + if check_attrs in self._cleanups: + self._cleanups.remove(check_attrs) self.temp_dir: FSStorage = self.env["fs.storage"].create( { "name": "Temp FS Storage", diff --git a/fs_folder/tests/common.py b/fs_folder/tests/common.py index ef546898a8..eb8cdf0286 100644 --- a/fs_folder/tests/common.py +++ b/fs_folder/tests/common.py @@ -48,6 +48,11 @@ def cleanup_tempdir(): def setUp(self): super().setUp() + # Remove check_attrs cleanup if exists to avoid conflict with FakeModelLoader. + # since superClass uses it for its own puposes not relevant for our tests. + check_attrs = (getattr(self, "check_attrs", None), tuple(), {}) + if check_attrs in self._cleanups: + self._cleanups.remove(check_attrs) # enforce temp_backend field since it seems that they are reset on # savepoint rollback when managed by server_environment -> TO Be investigated self.temp_backend.write( diff --git a/fs_image/tests/test_fs_image.py b/fs_image/tests/test_fs_image.py index fb9a9b8f64..bf4c7352f5 100644 --- a/fs_image/tests/test_fs_image.py +++ b/fs_image/tests/test_fs_image.py @@ -42,6 +42,11 @@ def setUpClass(cls): def setUp(self): super().setUp() + # Remove check_attrs cleanup if exists to avoid conflict with FakeModelLoader. + # since superClass uses it for its own puposes not relevant for our tests. + check_attrs = (getattr(self, "check_attrs", None), tuple(), {}) + if check_attrs in self._cleanups: + self._cleanups.remove(check_attrs) self.temp_dir: FSStorage = self.env["fs.storage"].create( { "name": "Temp FS Storage", diff --git a/fs_storage/README.rst b/fs_storage/README.rst index 8b8766f3de..151eaacbec 100644 --- a/fs_storage/README.rst +++ b/fs_storage/README.rst @@ -11,7 +11,7 @@ Filesystem Storage Backend !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:d014f99f164322e5728945acba9501ad254147c8285694164249782a838f3b15 + !! source digest: sha256:56e35c5816f37443d3bfb1ac7d6ebd4451e7b8c6e3d7c94a0f176f2b7d38b520 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/fs_storage/__manifest__.py b/fs_storage/__manifest__.py index f02c00eb5e..6d713a97ea 100644 --- a/fs_storage/__manifest__.py +++ b/fs_storage/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Filesystem Storage Backend", "summary": "Implement the concept of Storage with amazon S3, sftp...", - "version": "18.0.2.1.0", + "version": "18.0.2.1.1", "category": "FS Storage", "website": "https://github.com/OCA/storage", "author": " ACSONE SA/NV, Odoo Community Association (OCA)", diff --git a/fs_storage/i18n/fr.po b/fs_storage/i18n/fr.po new file mode 100644 index 0000000000..e353d5b968 --- /dev/null +++ b/fs_storage/i18n/fr.po @@ -0,0 +1,493 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fs_storage +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2026-03-12 16:22+0000\n" +"Last-Translator: Vincent Hatakeyama \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 5.15.2\n" + +#. module: fs_storage +#: model_terms:ir.ui.view,arch_db:fs_storage.fs_storage_form_view +msgid "Available options" +msgstr "Options disponibles" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__options_properties +msgid "Available properties" +msgstr "Propriétés disponibles" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__check_connection_method +#: model:ir.model.fields,field_description:fs_storage.field_fs_test_connection__check_connection_method +msgid "Check Connection Method" +msgstr "Méthode de vérification de la connexion" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_check_connection_method_env_default +msgid "Check Connection Method Env Default" +msgstr "" + +#. module: fs_storage +#: model_terms:ir.ui.view,arch_db:fs_storage.fs_test_connection_form_view +msgid "Close" +msgstr "Fermer" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__code +msgid "Code" +msgstr "Code" + +#. module: fs_storage +#. odoo-python +#: code:addons/fs_storage/models/fs_storage.py:0 +msgid "Connection Test Failed!" +msgstr "Échec du test de connexion !" + +#. module: fs_storage +#. odoo-python +#: code:addons/fs_storage/models/fs_storage.py:0 +msgid "Connection Test Succeeded!" +msgstr "Succès du test de connexion !" + +#. module: fs_storage +#. odoo-python +#: code:addons/fs_storage/models/fs_storage.py:0 +msgid "Create Marker file" +msgstr "Créer un fichier de marquage" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__create_uid +#: model:ir.model.fields,field_description:fs_storage.field_fs_test_connection__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__create_date +#: model:ir.model.fields,field_description:fs_storage.field_fs_test_connection__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__options_protocol +msgid "Describes Protocol" +msgstr "Décrit le protocole" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__directory_path +msgid "Directory Path" +msgstr "Chemin du répertoire" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_directory_path_env_default +msgid "Directory Path Env Default" +msgstr "Chemin du répertoire par défaut de l’environnement" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__display_name +#: model:ir.model.fields,field_description:fs_storage.field_fs_test_connection__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: fs_storage +#: model_terms:ir.ui.view,arch_db:fs_storage.fs_storage_form_view +msgid "Enter you fsspec options here." +msgstr "Entrer ici les options pour fsspec." + +#. module: fs_storage +#. odoo-python +#: code:addons/fs_storage/models/fs_storage.py:0 +msgid "Everything seems properly set up!" +msgstr "Tout semble bien configuré !" + +#. module: fs_storage +#: model:ir.actions.act_window,name:fs_storage.act_open_fs_storage_view +#: model:ir.model,name:fs_storage.model_fs_storage +#: model:ir.ui.menu,name:fs_storage.menu_fs_storage +#: model:ir.ui.menu,name:fs_storage.menu_storage +#: model_terms:ir.ui.view,arch_db:fs_storage.fs_storage_form_view +#: model_terms:ir.ui.view,arch_db:fs_storage.fs_storage_search_view +msgid "FS Storage" +msgstr "Stockage SF" + +#. module: fs_storage +#: model:ir.actions.act_window,name:fs_storage.act_open_fs_test_connection_view +msgid "FS Test Connection" +msgstr "Test de connexion FS" + +#. module: fs_storage +#: model:ir.model,name:fs_storage.model_fs_test_connection +msgid "FS Test Connection Wizard" +msgstr "Assistant de test de connexion FS" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__field_ids +msgid "Field" +msgstr "Champ" + +#. module: fs_storage +#. odoo-python +#: code:addons/fs_storage/models/fs_storage.py:0 +msgid "" +"Field %(field)s already stored in another FS storage ('%(other_storage)s')" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__field_xmlids +msgid "Field Xmlids" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_field_xmlids_env_default +msgid "Field Xmlids Env Default" +msgstr "" + +#. module: fs_storage +#: model:ir.model,name:fs_storage.model_ir_model_fields +msgid "Fields" +msgstr "Champs" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__id +#: model:ir.model.fields,field_description:fs_storage.field_fs_test_connection__id +msgid "ID" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__is_cacheable +msgid "" +"If True, once instantiated, the filesystem will be cached and reused.\n" +"By default, the filesystem is cacheable but in some cases, like when using OAuth2 authentication, the filesystem cannot be cached because it depends on the user and the token can change.\n" +"In this case, you can set this field to False to avoid caching the filesystem." +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_ir_model_fields__storage_id +msgid "" +"If specified, all attachments linked to this field will be stored in the " +"provided storage." +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_ir_model__storage_id +msgid "" +"If specified, all attachments linked to this model will be stored in the " +"provided storage." +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__is_cacheable +msgid "Is Cacheable" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__json_options +msgid "Json Options" +msgstr "Options JSON" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__write_uid +#: model:ir.model.fields,field_description:fs_storage.field_fs_test_connection__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__write_date +#: model:ir.model.fields,field_description:fs_storage.field_fs_test_connection__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: fs_storage +#. odoo-python +#: code:addons/fs_storage/models/fs_storage.py:0 +msgid "List File" +msgstr "Lister les fichiers" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__field_ids +msgid "" +"List of fields such as attachments linked to one of these fields will be " +"stored in this storage. NB: If the attachment is linked to a field that is " +"in one FS storage, and the related model is in another FS storage, we will " +"store it into the storage linked to the resource field." +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__field_xmlids +#: model:ir.model.fields,help:fs_storage.field_fs_storage__x_field_xmlids_env_default +msgid "" +"List of fields xml ids such as attachments linked to one of these fields " +"will be stored in this storage. NB: If the attachment is linked to a field " +"that is in one FS storage, and the related model is in another FS storage, " +"we will store it into the storage linked to the resource field." +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__model_ids +msgid "" +"List of models such as attachments linked to one of these models will be " +"stored in this storage." +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__model_xmlids +#: model:ir.model.fields,help:fs_storage.field_fs_storage__x_model_xmlids_env_default +msgid "" +"List of models xml ids such as attachments linked to one of these models " +"will be stored in this storage." +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__model_ids +msgid "Model" +msgstr "Modèle" + +#. module: fs_storage +#. odoo-python +#: code:addons/fs_storage/models/fs_storage.py:0 +msgid "" +"Model %(model)s already stored in another FS storage ('%(other_storage)s')" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__model_xmlids +msgid "Model Xmlids" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_model_xmlids_env_default +msgid "Model Xmlids Env Default" +msgstr "" + +#. module: fs_storage +#: model:ir.model,name:fs_storage.model_ir_model +msgid "Models" +msgstr "Modèles" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__name +msgid "Name" +msgstr "Nom" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__options +msgid "Options" +msgstr "Options" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_options_env_default +msgid "Options Env Default" +msgstr "Options par défaut de l’environnement" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__protocol +msgid "Protocol" +msgstr "Protocole" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__protocol_descr +#: model_terms:ir.ui.view,arch_db:fs_storage.fs_storage_form_view +msgid "Protocol Descr" +msgstr "Description du protocole" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_protocol_env_default +msgid "Protocol Env Default" +msgstr "Protocole par défaut de l’environnement" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__directory_path +#: model:ir.model.fields,help:fs_storage.field_fs_storage__x_directory_path_env_default +msgid "Relative path to the directory to store the file" +msgstr "Chemin relatif du répertoire au stocker le fichier" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__eval_options_from_env +msgid "Resolve env vars" +msgstr "Résoudre les variables d’environnement" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_eval_options_from_env_env_default +msgid "Resolve env vars Env Default" +msgstr "Résoudre les variables d’environnement par défaut de l’environnement" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__eval_options_from_env +#: model:ir.model.fields,help:fs_storage.field_fs_storage__x_eval_options_from_env_env_default +msgid "" +"Resolve options values starting with $ from environment variables. e.g\n" +" {\n" +" \"endpoint_url\": \"$AWS_ENDPOINT_URL\",\n" +" }\n" +" " +msgstr "" +"Résoudre les valeurs d’options commençant par $ depuis des variables " +"d’environnement. Par exemple :\n" +" {\n" +" \"endpoint_url\": \"$AWS_ENDPOINT_URL\",\n" +" }\n" +" " + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__server_env_defaults +msgid "Server Env Defaults" +msgstr "Serveur par défaut de l’environnement" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__check_connection_method +#: model:ir.model.fields,help:fs_storage.field_fs_storage__x_check_connection_method_env_default +msgid "" +"Set a method if you want the connection to remote to be checked every time the storage is used, in order to remove the obsolete connection from the cache.\n" +"* Create Marker file : Create a file on remote and check it exists\n" +"* List File : List all files from root directory" +msgstr "" +"Indiquer une méthode si vous voulez que la connexion distante soit testée à " +"chaque fois que le stockage est utilisé, dans le but d’enlever les " +"connexions obsolètes du cache.\n" +"* Créer un fichier de marque : créer un fichier sur le serveur distant et " +"vérifier qu’il existe.\n" +"* Faire la liste des fichiers : demander tous les fichiers du répertoire " +"racine." + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_test_connection__storage_id +#: model:ir.model.fields,field_description:fs_storage.field_ir_model__storage_id +#: model:ir.model.fields,field_description:fs_storage.field_ir_model_fields__storage_id +msgid "Storage" +msgstr "Stockage" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__code +msgid "" +"Technical code used to identify the storage backend into the code.This code " +"must be unique. This code is used for example to define the storage backend " +"to store the attachments via the configuration parameter " +"'ir_attachment.storage.force.database' when the module 'fs_attachment' is " +"installed." +msgstr "" +"Code technique utilisé pour identifier le stockage dans le code. Le code " +"doit être unique. Le code est entre autre utilisé pour définir le stockage à " +"utiliser pour stocker les pièces jointes via le paramètre de configuration «" +" ir_attachment.storage.force.database » lorsque le module fs_attachhment est " +"installé." + +#. module: fs_storage +#: model_terms:ir.ui.view,arch_db:fs_storage.fs_test_connection_form_view +msgid "Test Connection" +msgstr "Test de connexion" + +#. module: fs_storage +#: model_terms:ir.ui.view,arch_db:fs_storage.fs_storage_form_view +#: model_terms:ir.ui.view,arch_db:fs_storage.fs_test_connection_form_view +msgid "Test connection" +msgstr "Test de connexion" + +#. module: fs_storage +#: model:ir.model.constraint,message:fs_storage.constraint_fs_storage_code_uniq +msgid "The code must be unique" +msgstr "Le code doit être unique" + +#. module: fs_storage +#. odoo-python +#: code:addons/fs_storage/models/fs_storage.py:0 +msgid "The options must be a valid JSON" +msgstr "Les options doivent être du JSON valide" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__json_options +msgid "The options used to initialize the filesystem.\n" +msgstr "Les options pour initialiser le système de fichier.\n" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__options +#: model:ir.model.fields,help:fs_storage.field_fs_storage__x_options_env_default +msgid "" +"The options used to initialize the filesystem.\n" +"This is a JSON field that depends on the protocol used.\n" +"For example, for the sftp protocol, you can provide the following:\n" +"{\n" +" 'host': 'my.sftp.server',\n" +" 'ssh_kwrags': {\n" +" 'username': 'myuser',\n" +" 'password': 'mypassword',\n" +" 'port': 22,\n" +" }\n" +"}\n" +"For more information, please refer to the fsspec documentation:\n" +"https://filesystem-spec.readthedocs.io/en/latest/api.html#built-in-implementations" +msgstr "" +"Les options pour initialiser le système de fichier.\n" +"C’est un champ JSON qui dépend du protocole utilisé.\n" +"Par exemple, pour le protocole sftp, vous pouvez utiliser ce type de " +"valeur :\n" +"{\n" +" 'host': 'mon.sftp.server',\n" +" 'ssh_kwrags': {\n" +" 'username': 'monutilisateur',\n" +" 'password': 'monmotdepasse',\n" +" 'port': 22,\n" +" }\n" +"}\n" +"Pour plus d’information, referez-vous à la documentation de fsspec :\n" +"https://filesystem-spec.readthedocs.io/en/latest/api.html#built-in-" +"implementations" + +#. module: fs_storage +#: model:ir.model.fields,help:fs_storage.field_fs_storage__options_protocol +#: model:ir.model.fields,help:fs_storage.field_fs_storage__protocol +#: model:ir.model.fields,help:fs_storage.field_fs_storage__x_protocol_env_default +msgid "" +"The protocol used to access the content of filesystem.\n" +"This list is the one supported by the fsspec library (see https://filesystem-spec.readthedocs.io/en/latest). A filesystem protocolis added by default and refers to the odoo local filesystem.\n" +"Pay attention that according to the protocol, some options must beprovided through the options field." +msgstr "" +"Le protocole utilisé pour accéder le contenu du système de fichier.\n" +"Cette liste contient ce qui est supporté par la bibliothèque fsspec (voir " +"https://filesystem-spec.readthedocs.io/en/latest). Un système de fichier est " +"ajouté par défaut et fait référence au système de fichier utilisé par odoo.\n" +"Faites attention qu’en fonction du protocole, certaines options doivent être " +"fournis via le champ options." + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_check_connection_method_env_is_editable +msgid "X Check Connection Method Env Is Editable" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_directory_path_env_is_editable +msgid "X Directory Path Env Is Editable" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_eval_options_from_env_env_is_editable +msgid "X Eval Options From Env Env Is Editable" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_field_xmlids_env_is_editable +msgid "X Field Xmlids Env Is Editable" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_model_xmlids_env_is_editable +msgid "X Model Xmlids Env Is Editable" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_options_env_is_editable +msgid "X Options Env Is Editable" +msgstr "" + +#. module: fs_storage +#: model:ir.model.fields,field_description:fs_storage.field_fs_storage__x_protocol_env_is_editable +msgid "X Protocol Env Is Editable" +msgstr "" diff --git a/fs_storage/models/fs_storage.py b/fs_storage/models/fs_storage.py index 663546f972..b36a0dbbab 100644 --- a/fs_storage/models/fs_storage.py +++ b/fs_storage/models/fs_storage.py @@ -336,7 +336,7 @@ def _is_fs_cacheable(self, code): # For example, the msgd protocol is not cacheable because it uses # OAuth2 authentication and the token can change. fs_storage = self.get_by_code(code) - return fs_storage and fs_storage.is_cacheable + return fs_storage and fs_storage.sudo().is_cacheable @api.model @tools.ormcache() diff --git a/fs_storage/static/description/index.html b/fs_storage/static/description/index.html index ce556b8dbc..b54e96619f 100644 --- a/fs_storage/static/description/index.html +++ b/fs_storage/static/description/index.html @@ -372,7 +372,7 @@

Filesystem Storage Backend

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:d014f99f164322e5728945acba9501ad254147c8285694164249782a838f3b15 +!! source digest: sha256:56e35c5816f37443d3bfb1ac7d6ebd4451e7b8c6e3d7c94a0f176f2b7d38b520 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/storage Translate me on Weblate Try me on Runboat

This addon is a technical addon that allows you to define filesystem diff --git a/storage_thumbnail/tests/test_thumbnail.py b/storage_thumbnail/tests/test_thumbnail.py index e3f1304c0a..954cced924 100644 --- a/storage_thumbnail/tests/test_thumbnail.py +++ b/storage_thumbnail/tests/test_thumbnail.py @@ -25,6 +25,15 @@ def setUpClass(cls): cls.filename = "akretion-logo.png" return res + def setUp(self): + res = super().setUp() + # Remove check_attrs cleanup if exists to avoid conflict with FakeModelLoader. + # since superClass uses it for its own puposes not relevant for our tests. + check_attrs = (getattr(self, "check_attrs", None), tuple(), {}) + if check_attrs in self._cleanups: + self._cleanups.remove(check_attrs) + return res + @classmethod def tearDownClass(cls): cls.loader.restore_registry()