diff --git a/README.md b/README.md
index adf7845074..ae957e2920 100644
--- a/README.md
+++ b/README.md
@@ -22,10 +22,10 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
-[fs_attachment](fs_attachment/) | 16.0.3.1.1 |
| Store attachments on external object store
-[fs_attachment_environment](fs_attachment_environment/) | 16.0.1.0.0 | | Allows to use server environment with fs storage attachment
-[fs_attachment_s3](fs_attachment_s3/) | 16.0.3.1.0 |
| Store attachments into S3 complient filesystem
-[fs_attachment_s3_environment](fs_attachment_s3_environment/) | 16.0.1.0.0 | | Allows to use server environment with fs storage attachment S3
+[fs_attachment](fs_attachment/) | 16.0.3.1.2 |
| Store attachments on external object store
+[fs_attachment_environment](fs_attachment_environment/) | 16.0.1.0.1 | | Allows to use server environment with fs storage attachment
+[fs_attachment_s3](fs_attachment_s3/) | 16.0.3.1.1 |
| Store attachments into S3 complient filesystem
+[fs_attachment_s3_environment](fs_attachment_s3_environment/) | 16.0.1.0.1 | | Allows to use server environment with fs storage attachment S3
[fs_base_multi_image](fs_base_multi_image/) | 16.0.1.1.2 |
| Mulitple Images from External File System
[fs_base_multi_media](fs_base_multi_media/) | 16.0.1.0.2 |
| Give the possibility to store media data in external filesystem from odoo
[fs_file](fs_file/) | 16.0.1.0.7 |
| Field to store files into filesystem storages
@@ -36,10 +36,10 @@ addon | version | maintainers | summary
[fs_product_multi_image](fs_product_multi_image/) | 16.0.1.1.6 |
| Manage multi images from extenal file system on product
[fs_product_multi_media](fs_product_multi_media/) | 16.0.1.0.3 |
| Link media to products and categories
[fs_product_public_category_multi_image](fs_product_public_category_multi_image/) | 16.0.1.0.1 | | Manage multi images from extenal file system on eCommerce public categories
-[fs_storage](fs_storage/) | 16.0.2.0.0 | | Implement the concept of Storage with amazon S3, sftp...
-[fs_storage_backup](fs_storage_backup/) | 16.0.2.0.0 | | Filesystem Storage Backup
-[fs_storage_backup_environment](fs_storage_backup_environment/) | 16.0.1.0.0 | | Allows to use server environment with fs storage attachment
-[fs_storage_environment](fs_storage_environment/) | 16.0.1.0.0 | | Allows to use server environment with fs storage
+[fs_storage](fs_storage/) | 16.0.2.0.1 | | Implement the concept of Storage with amazon S3, sftp...
+[fs_storage_backup](fs_storage_backup/) | 16.0.2.0.1 | | Filesystem Storage Backup
+[fs_storage_backup_environment](fs_storage_backup_environment/) | 16.0.1.0.1 | | Allows to use server environment with fs storage attachment
+[fs_storage_environment](fs_storage_environment/) | 16.0.1.0.1 | | Allows to use server environment with fs storage
[image_tag](image_tag/) | 16.0.2.0.0 | | Image tag model
[image_tag_environment](image_tag_environment/) | 16.0.2.0.0 | | Server environment features for the Image Tag model
[storage_backend](storage_backend/) | 16.0.1.1.0 | | Implement the concept of Storage with amazon S3, sftp...
diff --git a/fs_attachment/README.rst b/fs_attachment/README.rst
index 624a857be9..ed6fc5e8c7 100644
--- a/fs_attachment/README.rst
+++ b/fs_attachment/README.rst
@@ -11,7 +11,7 @@ Base Attachment Object Store
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:d3192a906b0bd929f34b1c3a36f851f3ce0139e8a47b4b20c28e20eb996474ae
+ !! source digest: sha256:c3a363a10174dec42a5d02638f5af123c16bd53262e74a5ad101111053521e27
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/fs_attachment/__manifest__.py b/fs_attachment/__manifest__.py
index a2f642be50..25147ded3e 100644
--- a/fs_attachment/__manifest__.py
+++ b/fs_attachment/__manifest__.py
@@ -5,7 +5,7 @@
{
"name": "Base Attachment Object Store",
"summary": "Store attachments on external object store",
- "version": "16.0.3.1.1",
+ "version": "16.0.3.1.2",
"author": "Camptocamp, ACSONE SA/NV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"development_status": "Beta",
diff --git a/fs_attachment/i18n/es.po b/fs_attachment/i18n/es.po
index 4c360f5b0d..9fce75193d 100644
--- a/fs_attachment/i18n/es.po
+++ b/fs_attachment/i18n/es.po
@@ -135,11 +135,10 @@ msgstr "ID (identificación)"
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__use_x_sendfile_to_serve_internal_url
msgid ""
"If checked and odoo is behind a proxy that supports x-sendfile, the content "
-"served by the attachment's internal URL will be servedby the proxy using the"
-" fs_url if defined. If not, the file will be served by odoo that will stream"
-" the content read from the filesystem storage. This option is useful to "
-"avoid to serve files from odoo and therefore to avoid to load the odoo "
-"process. "
+"served by the attachment's internal URL will be servedby the proxy using the "
+"fs_url if defined. If not, the file will be served by odoo that will stream "
+"the content read from the filesystem storage. This option is useful to avoid "
+"to serve files from odoo and therefore to avoid to load the odoo process. "
msgstr ""
"Si esta marcado y odoo esta detrás de un servidor que soporta x-sendfile, el "
"contenido servido por la URL interna del adjunto será servido por el proxy "
@@ -154,8 +153,8 @@ msgid ""
"If checked, the autovacuum of the garbage collection will be automatically "
"executed when the storage is used to store attachments. Sometime, the "
"autovacuum is to avoid when files in the storage are referenced by other "
-"systems (like a website). In such case, records in the fs.file.gc table must"
-" be manually processed."
+"systems (like a website). In such case, records in the fs.file.gc table must "
+"be manually processed."
msgstr ""
"Si está marcada, el autovacío de la recolección de basura se ejecutará "
"automáticamente cuando el almacenamiento se utilice para guardar archivos "
@@ -185,19 +184,19 @@ msgstr ""
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__use_filename_obfuscation
msgid ""
"If checked, the filename will be obfuscated. This option is useful to avoid "
-"to expose sensitive information trough the URL or in the remote storage. The"
-" obfuscation is done using a hash of the filename. The original filename is "
-"stored in the attachment metadata. The obfusation is to avoid if the storage"
-" is used to store files that are referenced by other systems (like a "
-"website) where the filename is important for SEO."
+"to expose sensitive information trough the URL or in the remote storage. The "
+"obfuscation is done using a hash of the filename. The original filename is "
+"stored in the attachment metadata. The obfusation is to avoid if the storage "
+"is used to store files that are referenced by other systems (like a website) "
+"where the filename is important for SEO."
msgstr ""
"Si está marcada, el nombre del archivo será ofuscado. Esta opción es útil "
"para evitar exponer información sensible a través de la URL o en el "
"almacenamiento remoto. La ofuscación se realiza utilizando un hash del "
"nombre del archivo. El nombre original del archivo se almacena en los "
"metadatos del adjunto. La ofuscación es para evitar si el almacenamiento se "
-"utiliza para almacenar archivos que son referenciados por otros sistemas ("
-"como un sitio web) donde el nombre del archivo es importante para SEO."
+"utiliza para almacenar archivos que son referenciados por otros sistemas "
+"(como un sitio web) donde el nombre del archivo es importante para SEO."
#. module: fs_attachment
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__use_as_default_for_attachments
@@ -393,8 +392,19 @@ msgstr ""
"Código técnico utilizado para identificar el servidor de almacenamiento en "
"el código. Este código debe ser único. Este código se utiliza, por ejemplo, "
"para definir el servidor de almacenamiento para guardar los archivos "
-"adjuntos mediante el parámetro de configuración \"ir_attachment.storage.force"
-".database\" cuando se instala el módulo \"fs_attachment\"."
+"adjuntos mediante el parámetro de configuración "
+"\"ir_attachment.storage.force.database\" cuando se instala el módulo "
+"\"fs_attachment\"."
+
+#. module: fs_attachment
+#. odoo-python
+#: code:addons/fs_attachment/upgrades/16.0.3.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_attachment_environment' module is not available. It is required to "
+"preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_attachment'."
+msgstr ""
#. module: fs_attachment
#: model:ir.model.fields,help:fs_attachment.field_ir_attachment__fs_url
@@ -472,9 +482,17 @@ msgstr "Usar X-Sendfile Para Servir Url Internas"
#. module: fs_attachment
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__force_db_for_default_attachment_rules
msgid ""
-"When storing attachments in an external storage, storage may be slow.If the storage is used to store odoo attachments by default, this could lead to a bad user experience since small images (128, 256) are used in Odoo in list / kanban views. We want them to be fast to read.This field allows to force the store of some attachments in the odoo database. The value is a dict Where the key is the beginning of the mimetype to configure and the value is the limit in size below which attachments are kept in DB. 0 means no limit.\n"
+"When storing attachments in an external storage, storage may be slow.If the "
+"storage is used to store odoo attachments by default, this could lead to a "
+"bad user experience since small images (128, 256) are used in Odoo in "
+"list / kanban views. We want them to be fast to read.This field allows to "
+"force the store of some attachments in the odoo database. The value is a "
+"dict Where the key is the beginning of the mimetype to configure and the "
+"value is the limit in size below which attachments are kept in DB. 0 means "
+"no limit.\n"
"Default configuration means:\n"
-"* images mimetypes (image/png, image/jpeg, ...) below 50KB are stored in database\n"
+"* images mimetypes (image/png, image/jpeg, ...) below 50KB are stored in "
+"database\n"
"* application/javascript are stored in database whatever their size \n"
"* text/css are stored in database whatever their size"
msgstr ""
@@ -499,8 +517,8 @@ msgstr ""
#: code:addons/fs_attachment/models/ir_attachment.py:0
#, python-format
msgid ""
-"You can't write on multiple attachments with different mimetypes at the same"
-" time."
+"You can't write on multiple attachments with different mimetypes at the same "
+"time."
msgstr ""
"No se puede escribir en varios archivos adjuntos con diferentes tipos de "
"mimo tipos al mismo tiempo."
diff --git a/fs_attachment/i18n/fr.po b/fs_attachment/i18n/fr.po
index 447d0fc902..9ea2a25128 100644
--- a/fs_attachment/i18n/fr.po
+++ b/fs_attachment/i18n/fr.po
@@ -132,11 +132,10 @@ msgstr ""
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__use_x_sendfile_to_serve_internal_url
msgid ""
"If checked and odoo is behind a proxy that supports x-sendfile, the content "
-"served by the attachment's internal URL will be servedby the proxy using the"
-" fs_url if defined. If not, the file will be served by odoo that will stream"
-" the content read from the filesystem storage. This option is useful to "
-"avoid to serve files from odoo and therefore to avoid to load the odoo "
-"process. "
+"served by the attachment's internal URL will be servedby the proxy using the "
+"fs_url if defined. If not, the file will be served by odoo that will stream "
+"the content read from the filesystem storage. This option is useful to avoid "
+"to serve files from odoo and therefore to avoid to load the odoo process. "
msgstr ""
#. module: fs_attachment
@@ -145,8 +144,8 @@ msgid ""
"If checked, the autovacuum of the garbage collection will be automatically "
"executed when the storage is used to store attachments. Sometime, the "
"autovacuum is to avoid when files in the storage are referenced by other "
-"systems (like a website). In such case, records in the fs.file.gc table must"
-" be manually processed."
+"systems (like a website). In such case, records in the fs.file.gc table must "
+"be manually processed."
msgstr ""
#. module: fs_attachment
@@ -164,11 +163,11 @@ msgstr ""
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__use_filename_obfuscation
msgid ""
"If checked, the filename will be obfuscated. This option is useful to avoid "
-"to expose sensitive information trough the URL or in the remote storage. The"
-" obfuscation is done using a hash of the filename. The original filename is "
-"stored in the attachment metadata. The obfusation is to avoid if the storage"
-" is used to store files that are referenced by other systems (like a "
-"website) where the filename is important for SEO."
+"to expose sensitive information trough the URL or in the remote storage. The "
+"obfuscation is done using a hash of the filename. The original filename is "
+"stored in the attachment metadata. The obfusation is to avoid if the storage "
+"is used to store files that are referenced by other systems (like a website) "
+"where the filename is important for SEO."
msgstr ""
#. module: fs_attachment
@@ -336,6 +335,16 @@ msgid ""
"installed."
msgstr ""
+#. module: fs_attachment
+#. odoo-python
+#: code:addons/fs_attachment/upgrades/16.0.3.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_attachment_environment' module is not available. It is required to "
+"preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_attachment'."
+msgstr ""
+
#. module: fs_attachment
#: model:ir.model.fields,help:fs_attachment.field_ir_attachment__fs_url
msgid "The URL to access the file from the filesystem storage."
@@ -403,9 +412,17 @@ msgstr ""
#. module: fs_attachment
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__force_db_for_default_attachment_rules
msgid ""
-"When storing attachments in an external storage, storage may be slow.If the storage is used to store odoo attachments by default, this could lead to a bad user experience since small images (128, 256) are used in Odoo in list / kanban views. We want them to be fast to read.This field allows to force the store of some attachments in the odoo database. The value is a dict Where the key is the beginning of the mimetype to configure and the value is the limit in size below which attachments are kept in DB. 0 means no limit.\n"
+"When storing attachments in an external storage, storage may be slow.If the "
+"storage is used to store odoo attachments by default, this could lead to a "
+"bad user experience since small images (128, 256) are used in Odoo in "
+"list / kanban views. We want them to be fast to read.This field allows to "
+"force the store of some attachments in the odoo database. The value is a "
+"dict Where the key is the beginning of the mimetype to configure and the "
+"value is the limit in size below which attachments are kept in DB. 0 means "
+"no limit.\n"
"Default configuration means:\n"
-"* images mimetypes (image/png, image/jpeg, ...) below 50KB are stored in database\n"
+"* images mimetypes (image/png, image/jpeg, ...) below 50KB are stored in "
+"database\n"
"* application/javascript are stored in database whatever their size \n"
"* text/css are stored in database whatever their size"
msgstr ""
@@ -415,6 +432,6 @@ msgstr ""
#: code:addons/fs_attachment/models/ir_attachment.py:0
#, python-format
msgid ""
-"You can't write on multiple attachments with different mimetypes at the same"
-" time."
+"You can't write on multiple attachments with different mimetypes at the same "
+"time."
msgstr ""
diff --git a/fs_attachment/i18n/fs_attachment.pot b/fs_attachment/i18n/fs_attachment.pot
index 911b6042b6..2ce428f924 100644
--- a/fs_attachment/i18n/fs_attachment.pot
+++ b/fs_attachment/i18n/fs_attachment.pot
@@ -335,6 +335,16 @@ msgid ""
"installed."
msgstr ""
+#. module: fs_attachment
+#. odoo-python
+#: code:addons/fs_attachment/upgrades/16.0.3.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_attachment_environment' module is not available. It is required to "
+"preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_attachment'."
+msgstr ""
+
#. module: fs_attachment
#: model:ir.model.fields,help:fs_attachment.field_ir_attachment__fs_url
msgid "The URL to access the file from the filesystem storage."
diff --git a/fs_attachment/i18n/it.po b/fs_attachment/i18n/it.po
index d523516d38..53c994bcdb 100644
--- a/fs_attachment/i18n/it.po
+++ b/fs_attachment/i18n/it.po
@@ -136,11 +136,10 @@ msgstr "ID"
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__use_x_sendfile_to_serve_internal_url
msgid ""
"If checked and odoo is behind a proxy that supports x-sendfile, the content "
-"served by the attachment's internal URL will be servedby the proxy using the"
-" fs_url if defined. If not, the file will be served by odoo that will stream"
-" the content read from the filesystem storage. This option is useful to "
-"avoid to serve files from odoo and therefore to avoid to load the odoo "
-"process. "
+"served by the attachment's internal URL will be servedby the proxy using the "
+"fs_url if defined. If not, the file will be served by odoo that will stream "
+"the content read from the filesystem storage. This option is useful to avoid "
+"to serve files from odoo and therefore to avoid to load the odoo process. "
msgstr ""
"Se selezionata e Odoo è dietro unproxy che supporta x-sendfile, il contenuto "
"fornito dall'URL interno dell'allegato verrà fornito dal proxy utilizzando "
@@ -155,8 +154,8 @@ msgid ""
"If checked, the autovacuum of the garbage collection will be automatically "
"executed when the storage is used to store attachments. Sometime, the "
"autovacuum is to avoid when files in the storage are referenced by other "
-"systems (like a website). In such case, records in the fs.file.gc table must"
-" be manually processed."
+"systems (like a website). In such case, records in the fs.file.gc table must "
+"be manually processed."
msgstr ""
"Se selezionata, l'aspiratore automatico del cestino verrà eseguito "
"automaticamente quando il deposito è utilizzato per archiviare allegati. "
@@ -186,11 +185,11 @@ msgstr ""
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__use_filename_obfuscation
msgid ""
"If checked, the filename will be obfuscated. This option is useful to avoid "
-"to expose sensitive information trough the URL or in the remote storage. The"
-" obfuscation is done using a hash of the filename. The original filename is "
-"stored in the attachment metadata. The obfusation is to avoid if the storage"
-" is used to store files that are referenced by other systems (like a "
-"website) where the filename is important for SEO."
+"to expose sensitive information trough the URL or in the remote storage. The "
+"obfuscation is done using a hash of the filename. The original filename is "
+"stored in the attachment metadata. The obfusation is to avoid if the storage "
+"is used to store files that are referenced by other systems (like a website) "
+"where the filename is important for SEO."
msgstr ""
"Se selezionata, il nome del file sarà offuscato. Questa opzione è utile per "
"evitare di esporre informaZioni sensibili attravrso l'URL o su depositi "
@@ -392,6 +391,16 @@ msgstr ""
"parametro configurazione 'ir_attachment.storage.force.database' quando il "
"modulo 'fs_attachment' è installato."
+#. module: fs_attachment
+#. odoo-python
+#: code:addons/fs_attachment/upgrades/16.0.3.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_attachment_environment' module is not available. It is required to "
+"preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_attachment'."
+msgstr ""
+
#. module: fs_attachment
#: model:ir.model.fields,help:fs_attachment.field_ir_attachment__fs_url
msgid "The URL to access the file from the filesystem storage."
@@ -465,9 +474,17 @@ msgstr "Utilizza X-Sendfile per fornire l'URL interno"
#. module: fs_attachment
#: model:ir.model.fields,help:fs_attachment.field_fs_storage__force_db_for_default_attachment_rules
msgid ""
-"When storing attachments in an external storage, storage may be slow.If the storage is used to store odoo attachments by default, this could lead to a bad user experience since small images (128, 256) are used in Odoo in list / kanban views. We want them to be fast to read.This field allows to force the store of some attachments in the odoo database. The value is a dict Where the key is the beginning of the mimetype to configure and the value is the limit in size below which attachments are kept in DB. 0 means no limit.\n"
+"When storing attachments in an external storage, storage may be slow.If the "
+"storage is used to store odoo attachments by default, this could lead to a "
+"bad user experience since small images (128, 256) are used in Odoo in "
+"list / kanban views. We want them to be fast to read.This field allows to "
+"force the store of some attachments in the odoo database. The value is a "
+"dict Where the key is the beginning of the mimetype to configure and the "
+"value is the limit in size below which attachments are kept in DB. 0 means "
+"no limit.\n"
"Default configuration means:\n"
-"* images mimetypes (image/png, image/jpeg, ...) below 50KB are stored in database\n"
+"* images mimetypes (image/png, image/jpeg, ...) below 50KB are stored in "
+"database\n"
"* application/javascript are stored in database whatever their size \n"
"* text/css are stored in database whatever their size"
msgstr ""
@@ -492,8 +509,8 @@ msgstr ""
#: code:addons/fs_attachment/models/ir_attachment.py:0
#, python-format
msgid ""
-"You can't write on multiple attachments with different mimetypes at the same"
-" time."
+"You can't write on multiple attachments with different mimetypes at the same "
+"time."
msgstr ""
"Non si può scrivere su allegati multipli con tipi MIME differenti "
"contemporaneamente."
diff --git a/fs_attachment/migrations/16.0.3.0.0/post-migration.py b/fs_attachment/migrations/16.0.3.0.0/post-migration.py
deleted file mode 100644
index 6d3ab374a9..0000000000
--- a/fs_attachment/migrations/16.0.3.0.0/post-migration.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from openupgradelib import openupgrade
-
-
-@openupgrade.migrate()
-def migrate(env, version):
- if env["ir.module.module"].search(
- [("name", "=", "server_environment"), ("state", "=", "installed")]
- ):
- openupgrade.logged_query(
- env.cr,
- """
- UPDATE ir_module_module
- SET state = 'to install'
- WHERE name = 'fs_attachment_environment' AND state = 'uninstalled'
- """,
- )
diff --git a/fs_attachment/static/description/index.html b/fs_attachment/static/description/index.html
index d52db254ee..a5ce61d025 100644
--- a/fs_attachment/static/description/index.html
+++ b/fs_attachment/static/description/index.html
@@ -372,7 +372,7 @@
Base Attachment Object Store
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:d3192a906b0bd929f34b1c3a36f851f3ce0139e8a47b4b20c28e20eb996474ae
+!! source digest: sha256:c3a363a10174dec42a5d02638f5af123c16bd53262e74a5ad101111053521e27
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

In some cases, you need to store attachment in another system that the Odoo’s
diff --git a/fs_attachment/upgrades/16.0.3.0.0/post-update.py b/fs_attachment/upgrades/16.0.3.0.0/post-update.py
new file mode 100644
index 0000000000..e6627838d5
--- /dev/null
+++ b/fs_attachment/upgrades/16.0.3.0.0/post-update.py
@@ -0,0 +1,21 @@
+from openupgradelib import openupgrade
+
+from odoo import _, exceptions
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ module = env["ir.module.module"].search(
+ [("name", "=", "fs_attachment_environment")]
+ )
+ if not module:
+ raise exceptions.UserError(
+ _(
+ "The 'fs_attachment_environment' module is not available. "
+ "It is required to preserve the server environment managed "
+ "fields of 'fs.storage'. Make it available on the "
+ "addons path before upgrading 'fs_attachment'."
+ )
+ )
+ if module.state == "uninstalled":
+ module.button_install()
diff --git a/fs_attachment_environment/README.rst b/fs_attachment_environment/README.rst
index d1907f530a..d23b588bab 100644
--- a/fs_attachment_environment/README.rst
+++ b/fs_attachment_environment/README.rst
@@ -11,7 +11,7 @@ Filesystem Attachment Backend
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:93a449ff71a5ba8449c90817fe4cae17a678e93232fc20cb543f447f0ef84e6b
+ !! source digest: sha256:b140330d072cdcf8af7b23c6d2c4cce6577b67809817cbe30493ad213a6acd0a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/fs_attachment_environment/__init__.py b/fs_attachment_environment/__init__.py
index 0650744f6b..1a9a001cf7 100644
--- a/fs_attachment_environment/__init__.py
+++ b/fs_attachment_environment/__init__.py
@@ -1 +1,2 @@
from . import models
+from .hooks import post_init_hook, uninstall_hook
diff --git a/fs_attachment_environment/__manifest__.py b/fs_attachment_environment/__manifest__.py
index 8e4f8ae33a..3eb3291e9f 100644
--- a/fs_attachment_environment/__manifest__.py
+++ b/fs_attachment_environment/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Filesystem Attachment Backend",
"summary": "Allows to use server environment with fs storage attachment",
- "version": "16.0.1.0.0",
+ "version": "16.0.1.0.1",
"category": "FS Storage",
"website": "https://github.com/OCA/storage",
"author": " ACSONE SA/NV, Dixmit, Odoo Community Association (OCA)",
@@ -14,4 +14,6 @@
"depends": ["fs_storage_environment", "fs_attachment"],
"data": [],
"auto_install": True,
+ "post_init_hook": "post_init_hook",
+ "uninstall_hook": "uninstall_hook",
}
diff --git a/fs_attachment_environment/hooks.py b/fs_attachment_environment/hooks.py
new file mode 100644
index 0000000000..d07bfa368f
--- /dev/null
+++ b/fs_attachment_environment/hooks.py
@@ -0,0 +1,50 @@
+# Copyright 2026 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from psycopg2 import sql
+
+from odoo import SUPERUSER_ID, api
+
+from odoo.addons.server_environment.uninstall import restore_env_managed_columns
+
+ENV_MANAGED_FIELDS = [
+ "optimizes_directory_path",
+ "autovacuum_gc",
+ "base_url",
+ "is_directory_path_in_url",
+ "use_x_sendfile_to_serve_internal_url",
+ "use_as_default_for_attachments",
+ "force_db_for_default_attachment_rules",
+ "use_filename_obfuscation",
+ "model_xmlids",
+ "field_xmlids",
+]
+
+
+def post_init_hook(cr, registry):
+ """Preserve fallback values without violating the attachment rule constraint.
+
+ On a fresh install, Odoo initializes the new force database rules column on
+ existing storages with its non-empty default, even when the storage is not
+ the default attachment storage. The preservation helper writes fields back
+ through the ORM one at a time, so this temporary inconsistent state would
+ trigger the constraint. Normalize the stored fallback with SQL first.
+ """
+ env = api.Environment(cr, SUPERUSER_ID, {})
+ env.cr.execute(
+ sql.SQL("UPDATE {} SET {} = NULL WHERE NOT COALESCE({}, FALSE)").format(
+ sql.Identifier(env["fs.storage"]._table),
+ sql.Identifier("force_db_for_default_attachment_rules"),
+ sql.Identifier("use_as_default_for_attachments"),
+ )
+ )
+ env["fs.storage"]._preserve_not_env_managed_data(ENV_MANAGED_FIELDS)
+
+
+def uninstall_hook(env):
+ """Restore database columns dropped by server.env.mixin."""
+ restore_env_managed_columns(
+ env,
+ "fs.storage",
+ ENV_MANAGED_FIELDS,
+ )
diff --git a/fs_attachment_environment/static/description/index.html b/fs_attachment_environment/static/description/index.html
index 3f21fce2ee..e7b2fb2c62 100644
--- a/fs_attachment_environment/static/description/index.html
+++ b/fs_attachment_environment/static/description/index.html
@@ -372,7 +372,7 @@
Filesystem Attachment Backend
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:93a449ff71a5ba8449c90817fe4cae17a678e93232fc20cb543f447f0ef84e6b
+!! source digest: sha256:b140330d072cdcf8af7b23c6d2c4cce6577b67809817cbe30493ad213a6acd0a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Glue module for fs_attachment to use fs_storage_environment
diff --git a/fs_attachment_s3/README.rst b/fs_attachment_s3/README.rst
index 2ddf9fcb97..35f839fb76 100644
--- a/fs_attachment_s3/README.rst
+++ b/fs_attachment_s3/README.rst
@@ -11,7 +11,7 @@ Fs Attachment S3
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:99733e452f7f87c4697530e346fca3bc5c7402fb527630f6f64bf7e64f091a6c
+ !! source digest: sha256:b7264cf6b283fa23c0913ab0b556c4d95fd86ed47b5a4a8c9f61630f90c6a908
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/fs_attachment_s3/__manifest__.py b/fs_attachment_s3/__manifest__.py
index d478f6a10e..5701fd63ae 100644
--- a/fs_attachment_s3/__manifest__.py
+++ b/fs_attachment_s3/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Fs Attachment S3",
"summary": """Store attachments into S3 complient filesystem""",
- "version": "16.0.3.1.0",
+ "version": "16.0.3.1.1",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/storage",
diff --git a/fs_attachment_s3/i18n/fs_attachment_s3.pot b/fs_attachment_s3/i18n/fs_attachment_s3.pot
index 6dbd16db48..985635c235 100644
--- a/fs_attachment_s3/i18n/fs_attachment_s3.pot
+++ b/fs_attachment_s3/i18n/fs_attachment_s3.pot
@@ -41,6 +41,16 @@ msgstr ""
msgid "Signed URL Expiration (seconds)"
msgstr ""
+#. module: fs_attachment_s3
+#. odoo-python
+#: code:addons/fs_attachment_s3/upgrades/16.0.3.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_attachment_s3_environment' module is not available. It is required "
+"to preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_attachment_s3'."
+msgstr ""
+
#. module: fs_attachment_s3
#: model:ir.model.fields,help:fs_attachment_s3.field_fs_storage__s3_signed_url_expiration
msgid ""
diff --git a/fs_attachment_s3/i18n/it.po b/fs_attachment_s3/i18n/it.po
index d0d5f80a2d..8fb69958a6 100644
--- a/fs_attachment_s3/i18n/it.po
+++ b/fs_attachment_s3/i18n/it.po
@@ -48,6 +48,16 @@ msgstr ""
msgid "Signed URL Expiration (seconds)"
msgstr "Scadenza URL firmato (secondi)"
+#. module: fs_attachment_s3
+#. odoo-python
+#: code:addons/fs_attachment_s3/upgrades/16.0.3.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_attachment_s3_environment' module is not available. It is required "
+"to preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_attachment_s3'."
+msgstr ""
+
#. module: fs_attachment_s3
#: model:ir.model.fields,help:fs_attachment_s3.field_fs_storage__s3_signed_url_expiration
msgid ""
diff --git a/fs_attachment_s3/migrations/16.0.3.0.0/post-migration.py b/fs_attachment_s3/migrations/16.0.3.0.0/post-migration.py
deleted file mode 100644
index dc879c01d4..0000000000
--- a/fs_attachment_s3/migrations/16.0.3.0.0/post-migration.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from openupgradelib import openupgrade
-
-
-@openupgrade.migrate()
-def migrate(env, version):
- if env["ir.module.module"].search(
- [("name", "=", "server_environment"), ("state", "=", "installed")]
- ):
- openupgrade.logged_query(
- env.cr,
- """
- UPDATE ir_module_module
- SET state = 'to install'
- WHERE name = 'fs_attachment_s3_environment' AND state = 'uninstalled'
- """,
- )
diff --git a/fs_attachment_s3/static/description/index.html b/fs_attachment_s3/static/description/index.html
index 50515e89f7..bf663340b3 100644
--- a/fs_attachment_s3/static/description/index.html
+++ b/fs_attachment_s3/static/description/index.html
@@ -372,7 +372,7 @@ Fs Attachment S3
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:99733e452f7f87c4697530e346fca3bc5c7402fb527630f6f64bf7e64f091a6c
+!! source digest: sha256:b7264cf6b283fa23c0913ab0b556c4d95fd86ed47b5a4a8c9f61630f90c6a908
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

This module extends the functionality of
diff --git a/fs_attachment_s3/upgrades/16.0.3.0.0/post-update.py b/fs_attachment_s3/upgrades/16.0.3.0.0/post-update.py
new file mode 100644
index 0000000000..19299f15da
--- /dev/null
+++ b/fs_attachment_s3/upgrades/16.0.3.0.0/post-update.py
@@ -0,0 +1,21 @@
+from openupgradelib import openupgrade
+
+from odoo import _, exceptions
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ module = env["ir.module.module"].search(
+ [("name", "=", "fs_attachment_s3_environment")]
+ )
+ if not module:
+ raise exceptions.UserError(
+ _(
+ "The 'fs_attachment_s3_environment' module is not available. "
+ "It is required to preserve the server environment managed "
+ "fields of 'fs.storage'. Make it available on the "
+ "addons path before upgrading 'fs_attachment_s3'."
+ )
+ )
+ if module.state == "uninstalled":
+ module.button_install()
diff --git a/fs_attachment_s3_environment/README.rst b/fs_attachment_s3_environment/README.rst
index c5575f7a3c..073d7ac695 100644
--- a/fs_attachment_s3_environment/README.rst
+++ b/fs_attachment_s3_environment/README.rst
@@ -11,7 +11,7 @@ Filesystem Attachment Backend S3
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:617fd798b8b32bd68ff95a2e38c3e437dcbf516f67c9ccaecaf7ae57d2bd5bcb
+ !! source digest: sha256:cd0d634afd3e0b9d98d1ba372e0a0df14f3ee9c1761570c8770aa05c47ac0547
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/fs_attachment_s3_environment/__init__.py b/fs_attachment_s3_environment/__init__.py
index 0650744f6b..1a9a001cf7 100644
--- a/fs_attachment_s3_environment/__init__.py
+++ b/fs_attachment_s3_environment/__init__.py
@@ -1 +1,2 @@
from . import models
+from .hooks import post_init_hook, uninstall_hook
diff --git a/fs_attachment_s3_environment/__manifest__.py b/fs_attachment_s3_environment/__manifest__.py
index 9f8a8639b5..26ea203db7 100644
--- a/fs_attachment_s3_environment/__manifest__.py
+++ b/fs_attachment_s3_environment/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Filesystem Attachment Backend S3",
"summary": "Allows to use server environment with fs storage attachment S3",
- "version": "16.0.1.0.0",
+ "version": "16.0.1.0.1",
"category": "FS Storage",
"website": "https://github.com/OCA/storage",
"author": " ACSONE SA/NV, Dixmit, Odoo Community Association (OCA)",
@@ -14,4 +14,6 @@
"depends": ["fs_attachment_environment", "fs_attachment_s3"],
"data": [],
"auto_install": True,
+ "post_init_hook": "post_init_hook",
+ "uninstall_hook": "uninstall_hook",
}
diff --git a/fs_attachment_s3_environment/hooks.py b/fs_attachment_s3_environment/hooks.py
new file mode 100644
index 0000000000..c18fccd9e7
--- /dev/null
+++ b/fs_attachment_s3_environment/hooks.py
@@ -0,0 +1,25 @@
+# Copyright 2026 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import SUPERUSER_ID, api
+
+from odoo.addons.server_environment.uninstall import restore_env_managed_columns
+
+ENV_MANAGED_FIELDS = [
+ "s3_uses_signed_url_for_x_sendfile",
+ "s3_signed_url_expiration",
+]
+
+
+def post_init_hook(cr, registry):
+ env = api.Environment(cr, SUPERUSER_ID, {})
+ env["fs.storage"]._preserve_not_env_managed_data(ENV_MANAGED_FIELDS)
+
+
+def uninstall_hook(env):
+ """Restore database columns dropped by server.env.mixin."""
+ restore_env_managed_columns(
+ env,
+ "fs.storage",
+ ENV_MANAGED_FIELDS,
+ )
diff --git a/fs_attachment_s3_environment/static/description/index.html b/fs_attachment_s3_environment/static/description/index.html
index 9425529cdb..cd341d44e0 100644
--- a/fs_attachment_s3_environment/static/description/index.html
+++ b/fs_attachment_s3_environment/static/description/index.html
@@ -372,7 +372,7 @@
Filesystem Attachment Backend S3
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:617fd798b8b32bd68ff95a2e38c3e437dcbf516f67c9ccaecaf7ae57d2bd5bcb
+!! source digest: sha256:cd0d634afd3e0b9d98d1ba372e0a0df14f3ee9c1761570c8770aa05c47ac0547
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Glue module for fs_attachment to use fs_storage_environment
diff --git a/fs_storage/README.rst b/fs_storage/README.rst
index 6ceab6540e..66eeda19ad 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:1f585ecd248ce63d35596b35153294b0816df9d2b18b7289f57c7b0f39a0ee6a
+ !! source digest: sha256:4b4efe3b31fd4d91a920597b1bfe46b153cdf10fc374dbf9d25c4c817cbf38de
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -169,6 +169,14 @@ Known issues / Roadmap
Changelog
=========
+16.0.2.0.1 (2026-08-25)
+~~~~~~~~~~~~~~~~~~~~~~~
+
+**Features**
+
+- - Remove the dependancy of server_environment module and make fs_storage_environment a bridge between fs_storage and server_environment modules. (`#627 `_)
+
+
16.0.1.5.0 (2026-05-26)
~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/fs_storage/__manifest__.py b/fs_storage/__manifest__.py
index 473de7a8b8..7804750ea4 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": "16.0.2.0.0",
+ "version": "16.0.2.0.1",
"category": "FS Storage",
"website": "https://github.com/OCA/storage",
"author": " ACSONE SA/NV, Odoo Community Association (OCA)",
diff --git a/fs_storage/i18n/de.po b/fs_storage/i18n/de.po
index 91a42b93a3..5318164fc6 100644
--- a/fs_storage/i18n/de.po
+++ b/fs_storage/i18n/de.po
@@ -287,6 +287,16 @@ msgstr "Verbindung testen"
msgid "Test connection"
msgstr "Verbindung testen"
+#. module: fs_storage
+#. odoo-python
+#: code:addons/fs_storage/upgrades/16.0.2.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_storage_environment' module is not available. It is required to "
+"preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_storage'."
+msgstr ""
+
#. module: fs_storage
#: model:ir.model.constraint,message:fs_storage.constraint_fs_storage_code_uniq
msgid "The code must be unique"
diff --git a/fs_storage/i18n/es.po b/fs_storage/i18n/es.po
index 686b56c9a7..5951ce06c9 100644
--- a/fs_storage/i18n/es.po
+++ b/fs_storage/i18n/es.po
@@ -271,6 +271,16 @@ msgstr ""
msgid "Test connection"
msgstr "Probar conexión"
+#. module: fs_storage
+#. odoo-python
+#: code:addons/fs_storage/upgrades/16.0.2.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_storage_environment' module is not available. It is required to "
+"preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_storage'."
+msgstr ""
+
#. module: fs_storage
#: model:ir.model.constraint,message:fs_storage.constraint_fs_storage_code_uniq
msgid "The code must be unique"
diff --git a/fs_storage/i18n/fr.po b/fs_storage/i18n/fr.po
index d40c8f4546..8b1e0e141b 100644
--- a/fs_storage/i18n/fr.po
+++ b/fs_storage/i18n/fr.po
@@ -277,6 +277,16 @@ msgstr "Test de connexion"
msgid "Test connection"
msgstr "Test de connexion"
+#. module: fs_storage
+#. odoo-python
+#: code:addons/fs_storage/upgrades/16.0.2.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_storage_environment' module is not available. It is required to "
+"preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_storage'."
+msgstr ""
+
#. module: fs_storage
#: model:ir.model.constraint,message:fs_storage.constraint_fs_storage_code_uniq
msgid "The code must be unique"
diff --git a/fs_storage/i18n/fs_storage.pot b/fs_storage/i18n/fs_storage.pot
index 87b62b0ae7..2c258dcf8f 100644
--- a/fs_storage/i18n/fs_storage.pot
+++ b/fs_storage/i18n/fs_storage.pot
@@ -251,6 +251,16 @@ msgstr ""
msgid "Test connection"
msgstr ""
+#. module: fs_storage
+#. odoo-python
+#: code:addons/fs_storage/upgrades/16.0.2.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_storage_environment' module is not available. It is required to "
+"preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_storage'."
+msgstr ""
+
#. module: fs_storage
#: model:ir.model.constraint,message:fs_storage.constraint_fs_storage_code_uniq
msgid "The code must be unique"
diff --git a/fs_storage/i18n/it.po b/fs_storage/i18n/it.po
index e9d720b735..d2d6cae8b7 100644
--- a/fs_storage/i18n/it.po
+++ b/fs_storage/i18n/it.po
@@ -284,6 +284,16 @@ msgstr "Prova connessione"
msgid "Test connection"
msgstr "Prova connessione"
+#. module: fs_storage
+#. odoo-python
+#: code:addons/fs_storage/upgrades/16.0.2.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_storage_environment' module is not available. It is required to "
+"preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_storage'."
+msgstr ""
+
#. module: fs_storage
#: model:ir.model.constraint,message:fs_storage.constraint_fs_storage_code_uniq
msgid "The code must be unique"
diff --git a/fs_storage/migrations/16.0.2.0.0/post-migration.py b/fs_storage/migrations/16.0.2.0.0/post-migration.py
deleted file mode 100644
index 187a8b0c74..0000000000
--- a/fs_storage/migrations/16.0.2.0.0/post-migration.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from openupgradelib import openupgrade
-
-
-@openupgrade.migrate()
-def migrate(env, version):
- if env["ir.module.module"].search(
- [("name", "=", "server_environment"), ("state", "=", "installed")]
- ):
- openupgrade.logged_query(
- env.cr,
- """
- UPDATE ir_module_module
- SET state = 'to install'
- WHERE name = 'fs_storage_environment' AND state = 'uninstalled'
- """,
- )
diff --git a/fs_storage/readme/HISTORY.rst b/fs_storage/readme/HISTORY.rst
index 95c01c7de0..9ac29b8b7d 100644
--- a/fs_storage/readme/HISTORY.rst
+++ b/fs_storage/readme/HISTORY.rst
@@ -1,3 +1,11 @@
+16.0.2.0.1 (2026-08-25)
+~~~~~~~~~~~~~~~~~~~~~~~
+
+**Features**
+
+- - Remove the dependancy of server_environment module and make fs_storage_environment a bridge between fs_storage and server_environment modules. (`#627 `_)
+
+
16.0.1.5.0 (2026-05-26)
~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/fs_storage/readme/newsfragments/627.feature.rst b/fs_storage/readme/newsfragments/627.feature.rst
deleted file mode 100644
index 0107afb987..0000000000
--- a/fs_storage/readme/newsfragments/627.feature.rst
+++ /dev/null
@@ -1 +0,0 @@
-- Remove the dependancy of server_environment module and make fs_storage_environment a bridge between fs_storage and server_environment modules.
\ No newline at end of file
diff --git a/fs_storage/static/description/index.html b/fs_storage/static/description/index.html
index 25fddbe444..3e9a874171 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:1f585ecd248ce63d35596b35153294b0816df9d2b18b7289f57c7b0f39a0ee6a
+!! source digest: sha256:4b4efe3b31fd4d91a920597b1bfe46b153cdf10fc374dbf9d25c4c817cbf38de
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

This addon is a technical addon that allows you to define filesystem like
@@ -442,18 +442,19 @@
Filesystem Storage Backend
Known issues / Roadmap
Changelog
-Bug Tracker
-Credits
@@ -524,35 +525,45 @@
-
+
Features
-- Replace {db_name} by the database name in directory_path (#db_name)
+
+- Remove the dependancy of server_environment module and make fs_storage_environment a bridge between fs_storage and server_environment modules. (#627)
+
+
-
+
Features
-- Invalidate FS filesystem object cache when the connection fails, forcing a reconnection. (#320)
+- Replace {db_name} by the database name in directory_path (#db_name)
-
+
Features
-- Add parameter on storage backend to resolve protocol options values starting with $ from environment variables (#303)
+- Invalidate FS filesystem object cache when the connection fails, forcing a reconnection. (#320)
-
+
+
Features
+
+- Add parameter on storage backend to resolve protocol options values starting with $ from environment variables (#303)
+
+
+
+
Bugfixes
- Fix access to technical models to be able to upload attachments for users with basic access (#289)
-
-
+
+
Bugfixes
- Avoid config error when using the webdav protocol. The auth option is expected
@@ -563,7 +574,7 @@
-
+
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
@@ -571,15 +582,15 @@
Do not contact contributors directly about support or help with technical issues.
-
+
-
+
This module is maintained by the OCA.
diff --git a/fs_storage/upgrades/16.0.2.0.0/post-update.py b/fs_storage/upgrades/16.0.2.0.0/post-update.py
new file mode 100644
index 0000000000..626ada9ca6
--- /dev/null
+++ b/fs_storage/upgrades/16.0.2.0.0/post-update.py
@@ -0,0 +1,19 @@
+from openupgradelib import openupgrade
+
+from odoo import _, exceptions
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ module = env["ir.module.module"].search([("name", "=", "fs_storage_environment")])
+ if not module:
+ raise exceptions.UserError(
+ _(
+ "The 'fs_storage_environment' module is not available. "
+ "It is required to preserve the server environment managed "
+ "fields of 'fs.storage'. Make it available on the "
+ "addons path before upgrading 'fs_storage'."
+ )
+ )
+ if module.state == "uninstalled":
+ module.button_install()
diff --git a/fs_storage_backup/README.rst b/fs_storage_backup/README.rst
index 88bbffbdb5..eb85d86558 100644
--- a/fs_storage_backup/README.rst
+++ b/fs_storage_backup/README.rst
@@ -11,7 +11,7 @@ Filesystem Storage Backup
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:8807e2f7047d49c7e92ec609a2e717422f1c78749d09c0114dd33acc5dc70c5f
+ !! source digest: sha256:d2566b608dd1c637cb0b568c7314f3eab9317d32dfc1a68de3afa4a27bb30a3a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/fs_storage_backup/__manifest__.py b/fs_storage_backup/__manifest__.py
index 0691954508..14bb2fe0ba 100644
--- a/fs_storage_backup/__manifest__.py
+++ b/fs_storage_backup/__manifest__.py
@@ -1,7 +1,7 @@
{
"name": "Filesystem Storage Backup",
"category": "Technical",
- "version": "16.0.2.0.0",
+ "version": "16.0.2.0.1",
"license": "AGPL-3",
"author": "Onestein, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/storage",
diff --git a/fs_storage_backup/i18n/fs_storage_backup.pot b/fs_storage_backup/i18n/fs_storage_backup.pot
index 15799348b4..39a09d1cde 100644
--- a/fs_storage_backup/i18n/fs_storage_backup.pot
+++ b/fs_storage_backup/i18n/fs_storage_backup.pot
@@ -161,6 +161,16 @@ msgstr ""
msgid "Number of messages with delivery error"
msgstr ""
+#. module: fs_storage_backup
+#. odoo-python
+#: code:addons/fs_storage_backup/upgrades/16.0.2.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_storage_backup_environment' module is not available. It is required "
+"to preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_storage_backup'."
+msgstr ""
+
#. module: fs_storage_backup
#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__use_for_backup
msgid "Use For Backups"
diff --git a/fs_storage_backup/i18n/it.po b/fs_storage_backup/i18n/it.po
index cca4374749..d2dc45dbe7 100644
--- a/fs_storage_backup/i18n/it.po
+++ b/fs_storage_backup/i18n/it.po
@@ -164,6 +164,16 @@ msgstr "Numero di messaggi che richiedono un'azione"
msgid "Number of messages with delivery error"
msgstr "Numero di messaggi con errore di consegna"
+#. module: fs_storage_backup
+#. odoo-python
+#: code:addons/fs_storage_backup/upgrades/16.0.2.0.0/post-update.py:0
+#, python-format
+msgid ""
+"The 'fs_storage_backup_environment' module is not available. It is required "
+"to preserve the server environment managed fields of 'fs.storage'. Make it "
+"available on the addons path before upgrading 'fs_storage_backup'."
+msgstr ""
+
#. module: fs_storage_backup
#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__use_for_backup
msgid "Use For Backups"
diff --git a/fs_storage_backup/migrations/16.0.2.0.0/post-migration.py b/fs_storage_backup/migrations/16.0.2.0.0/post-migration.py
deleted file mode 100644
index 50b8d1c896..0000000000
--- a/fs_storage_backup/migrations/16.0.2.0.0/post-migration.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from openupgradelib import openupgrade
-
-
-@openupgrade.migrate()
-def migrate(env, version):
- if env["ir.module.module"].search(
- [("name", "=", "server_environment"), ("state", "=", "installed")]
- ):
- openupgrade.logged_query(
- env.cr,
- """
- UPDATE ir_module_module
- SET state = 'to install'
- WHERE name = 'fs_storage_backup_environment' AND state = 'uninstalled'
- """,
- )
diff --git a/fs_storage_backup/static/description/index.html b/fs_storage_backup/static/description/index.html
index 317613def4..7620c2f269 100644
--- a/fs_storage_backup/static/description/index.html
+++ b/fs_storage_backup/static/description/index.html
@@ -372,7 +372,7 @@ Filesystem Storage Backup
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:8807e2f7047d49c7e92ec609a2e717422f1c78749d09c0114dd33acc5dc70c5f
+!! source digest: sha256:d2566b608dd1c637cb0b568c7314f3eab9317d32dfc1a68de3afa4a27bb30a3a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

With this module you can configure one or more database backup
diff --git a/fs_storage_backup/upgrades/16.0.2.0.0/post-update.py b/fs_storage_backup/upgrades/16.0.2.0.0/post-update.py
new file mode 100644
index 0000000000..dac91a2118
--- /dev/null
+++ b/fs_storage_backup/upgrades/16.0.2.0.0/post-update.py
@@ -0,0 +1,21 @@
+from openupgradelib import openupgrade
+
+from odoo import _, exceptions
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ module = env["ir.module.module"].search(
+ [("name", "=", "fs_storage_backup_environment")]
+ )
+ if not module:
+ raise exceptions.UserError(
+ _(
+ "The 'fs_storage_backup_environment' module is not available. "
+ "It is required to preserve the server environment managed "
+ "fields of 'fs.storage'. Make it available on the "
+ "addons path before upgrading 'fs_storage_backup'."
+ )
+ )
+ if module.state == "uninstalled":
+ module.button_install()
diff --git a/fs_storage_backup_environment/README.rst b/fs_storage_backup_environment/README.rst
index 40d406c618..5144fb022a 100644
--- a/fs_storage_backup_environment/README.rst
+++ b/fs_storage_backup_environment/README.rst
@@ -11,7 +11,7 @@ Filesystem Attachment Backend
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:21cdfd856dc6413f9bd570a8fbb5c9fc7aa7488d81cf1ab194edf6805a1c91e3
+ !! source digest: sha256:95cf596ae00094de348dfbe9370441b5a11b7d125e6b79ca1b53bf6c3d220e02
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/fs_storage_backup_environment/__init__.py b/fs_storage_backup_environment/__init__.py
index 0650744f6b..1a9a001cf7 100644
--- a/fs_storage_backup_environment/__init__.py
+++ b/fs_storage_backup_environment/__init__.py
@@ -1 +1,2 @@
from . import models
+from .hooks import post_init_hook, uninstall_hook
diff --git a/fs_storage_backup_environment/__manifest__.py b/fs_storage_backup_environment/__manifest__.py
index 9b4e4b242e..d09890d986 100644
--- a/fs_storage_backup_environment/__manifest__.py
+++ b/fs_storage_backup_environment/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Filesystem Attachment Backend",
"summary": "Allows to use server environment with fs storage attachment",
- "version": "16.0.1.0.0",
+ "version": "16.0.1.0.1",
"category": "FS Storage",
"website": "https://github.com/OCA/storage",
"author": " ACSONE SA/NV, Dixmit, Odoo Community Association (OCA)",
@@ -14,4 +14,6 @@
"depends": ["fs_storage_environment", "fs_storage_backup"],
"data": [],
"auto_install": True,
+ "post_init_hook": "post_init_hook",
+ "uninstall_hook": "uninstall_hook",
}
diff --git a/fs_storage_backup_environment/hooks.py b/fs_storage_backup_environment/hooks.py
new file mode 100644
index 0000000000..111796c7ad
--- /dev/null
+++ b/fs_storage_backup_environment/hooks.py
@@ -0,0 +1,28 @@
+# Copyright 2026 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import SUPERUSER_ID, api
+
+from odoo.addons.server_environment.uninstall import restore_env_managed_columns
+
+ENV_MANAGED_FIELDS = [
+ "use_for_backup",
+ "backup_include_filestore",
+ "backup_filename_format",
+ "backup_keep_time",
+ "backup_dir",
+]
+
+
+def post_init_hook(cr, registry):
+ env = api.Environment(cr, SUPERUSER_ID, {})
+ env["fs.storage"]._preserve_not_env_managed_data(ENV_MANAGED_FIELDS)
+
+
+def uninstall_hook(env):
+ """Restore database columns dropped by server.env.mixin."""
+ restore_env_managed_columns(
+ env,
+ "fs.storage",
+ ENV_MANAGED_FIELDS,
+ )
diff --git a/fs_storage_backup_environment/static/description/index.html b/fs_storage_backup_environment/static/description/index.html
index 04cb77133d..a1d20e578e 100644
--- a/fs_storage_backup_environment/static/description/index.html
+++ b/fs_storage_backup_environment/static/description/index.html
@@ -372,7 +372,7 @@
Filesystem Attachment Backend
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:21cdfd856dc6413f9bd570a8fbb5c9fc7aa7488d81cf1ab194edf6805a1c91e3
+!! source digest: sha256:95cf596ae00094de348dfbe9370441b5a11b7d125e6b79ca1b53bf6c3d220e02
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Glue module for fs_storage_backup to use fs_storage_environment
diff --git a/fs_storage_environment/README.rst b/fs_storage_environment/README.rst
index 9000df101a..ac6d75f254 100644
--- a/fs_storage_environment/README.rst
+++ b/fs_storage_environment/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:2941c59791e8663069acd65744d45c7a2ecf1c4958253b1434b4d2cf21e6988c
+ !! source digest: sha256:5ca3d9c47efa4437eaa2c0a6d9968adc8b708f41d7a9848a7d96afdd1fd5c0cb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/fs_storage_environment/__init__.py b/fs_storage_environment/__init__.py
index 0650744f6b..1a9a001cf7 100644
--- a/fs_storage_environment/__init__.py
+++ b/fs_storage_environment/__init__.py
@@ -1 +1,2 @@
from . import models
+from .hooks import post_init_hook, uninstall_hook
diff --git a/fs_storage_environment/__manifest__.py b/fs_storage_environment/__manifest__.py
index 9c665f6e1a..07c6f3bce3 100644
--- a/fs_storage_environment/__manifest__.py
+++ b/fs_storage_environment/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Filesystem Storage Backend",
"summary": "Allows to use server environment with fs storage",
- "version": "16.0.1.0.0",
+ "version": "16.0.1.0.1",
"category": "FS Storage",
"website": "https://github.com/OCA/storage",
"author": " ACSONE SA/NV, Dixmit, Odoo Community Association (OCA)",
@@ -13,4 +13,6 @@
"installable": True,
"depends": ["fs_storage", "server_environment"],
"data": [],
+ "post_init_hook": "post_init_hook",
+ "uninstall_hook": "uninstall_hook",
}
diff --git a/fs_storage_environment/hooks.py b/fs_storage_environment/hooks.py
new file mode 100644
index 0000000000..7812e910f1
--- /dev/null
+++ b/fs_storage_environment/hooks.py
@@ -0,0 +1,29 @@
+# Copyright 2026 Camptocamp SA
+# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
+
+from odoo import SUPERUSER_ID, api
+
+from odoo.addons.server_environment.uninstall import restore_env_managed_columns
+
+ENV_MANAGED_FIELDS = [
+ "protocol",
+ "options",
+ "directory_path",
+ "eval_options_from_env",
+ "check_connection_method",
+]
+
+
+def post_init_hook(cr, registry):
+ env = api.Environment(cr, SUPERUSER_ID, {})
+ env["fs.storage"]._preserve_not_env_managed_data(ENV_MANAGED_FIELDS)
+
+
+def uninstall_hook(env):
+ """Restore database columns dropped by server.env.mixin."""
+ restore_env_managed_columns(
+ env,
+ "fs.storage",
+ ENV_MANAGED_FIELDS,
+ field_defaults={"protocol": "odoofs"},
+ )
diff --git a/fs_storage_environment/static/description/index.html b/fs_storage_environment/static/description/index.html
index a0b919ef04..f6f635c09c 100644
--- a/fs_storage_environment/static/description/index.html
+++ b/fs_storage_environment/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:2941c59791e8663069acd65744d45c7a2ecf1c4958253b1434b4d2cf21e6988c
+!! source digest: sha256:5ca3d9c47efa4437eaa2c0a6d9968adc8b708f41d7a9848a7d96afdd1fd5c0cb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

This module allows to use server environment with fs storage. It is a bridge between fs_storage and server_environment modules. It provides an implementation of the StorageEnvironment class that uses the filesystem as a storage backend.