Metadata-Version: 2.1
Name: odoo-addon-fs_storage_environment
Version: 18.0.1.0.0.5
Requires-Python: >=3.10
Requires-Dist: odoo-addon-fs_storage==18.0.*
Requires-Dist: odoo-addon-server_environment==18.0.*
Requires-Dist: odoo==18.0.*
Summary: Allows to use server environment with fs storage
Home-page: https://github.com/OCA/storage
License: LGPL-3
Author: ACSONE SA/NV, Dixmit, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Development Status :: 4 - Beta
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

==========================
Filesystem Storage Backend
==========================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:70fb6feabc3a533a8f4c3f00fde7bb2bbf14c0d0d4fe22fd258576d8c25acb3b
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
    :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstorage-lightgray.png?logo=github
    :target: https://github.com/OCA/storage/tree/18.0/fs_storage_environment
    :alt: OCA/storage
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/storage-18-0/storage-18-0-fs_storage_environment
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/storage&target_branch=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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.

**Table of contents**

.. contents::
   :local:

Usage
=====

To ease the management of the filesystem storages configuration accross
the different environments, the configuration of the filesystem storages
can be defined in environment files or directly in the main
configuration file. For example, the configuration of a filesystem
storage with the code fsprod can be provided in the main configuration
file as follows:

.. code:: ini

   [fs_storage.fsprod]
   protocol=s3
   options={"endpoint_url": "https://my_s3_server/", "key": "KEY", "secret": "SECRET"}
   directory_path=my_bucket

To work, a storage.backend record must exist with the code fsprod into
the database. In your configuration section, you can specify the value
for the following fields:

- protocol
- options
- directory_path

When evaluating directory_path, {db_name} is replaced by the database
name. This is usefull in multi-tenant with a setup completly controlled
by configuration files.

Migration from storage_backend
------------------------------

The fs_storage addon can be used to replace the storage_backend addon.
(It has been designed to be a drop-in replacement for the
storage_backend addon). To ease the migration, the fs.storage model
defines the high-level methods available in the storage_backend model.
These methods are:

- add
- get
- list_files
- find_files
- move_files
- delete

These methods are wrappers around the methods of the
fsspec.AbstractFileSystem class (see
https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem).
These methods are marked as deprecated and will be removed in a future
version (V18) of the addon. You should use the methods of the
fsspec.AbstractFileSystem class instead since they are more flexible and
powerful. You can access the instance of the fsspec.AbstractFileSystem
class using the fs property of a fs.storage record.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/storage/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
`feedback <https://github.com/OCA/storage/issues/new?body=module:%20fs_storage_environment%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ACSONE SA/NV
* Dixmit

Contributors
------------

- Laurent Mignon <laurent.mignon@acsone.eu>
- Sébastien BEAU <sebastien.beau@akretion.com>
- Enric Tobella

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/storage <https://github.com/OCA/storage/tree/18.0/fs_storage_environment>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
