This module allow you to deal with remote communication to import/export files.
It allow to store paths and settings from/to remote servers.
This module allows to **import/export files** from/to backend servers.
It depends of attachment_queue to store attachments
A backend server is defined by the basic `storage_backend <https://github.com/OCA/storage/tree/12.0/storage_backend>`_ OCA module, while it can be configured (amazon S3, sftp,...) with additional modules from the `storage <https://github.com/oca/storage>`_ repository.
With additional modules coming from https://github.com/storage you can use ftp, sftp, etc
The imported files (and the files to be exported) are stored in Odoo as ``attachment.queue`` objects, defined by the `attachment_queue <https://github.com/OCA/server-tools/tree/12.0/attachment_queue>`_ module while the importation itself (resp. exportation) is realized by **"Attachments Import Tasks"** (resp. "Attachments Export Tasks") defined by this current module.
**Table of contents**
..contents::
:local:
Configuration
=============
Usage
=====
To use this module, you need to:
As importation and exportation are different processes, they are triggered in different ways :
* Add a location with your server infos
* Create a task with your file info and remote communication method
* A cron task will trigger each task
**To import files**, you need to create an *"Attachment Import Task"* (menu *Settings > Technical > Attachments Import Tasks*) which defines :
- where to find the files to import from the backend server (path to the files, selection pattern)
- what to do with the source files in the backend server (avoid duplicates, delete/rename after import...)
- how the files will be processed once imported (through the **File Type** field).
**To export files**, you need first to register them as *"Attachments Queues"* objects linked to an *"Attachment Export Task"* (which set automatically their **File Type** to *"Export File (External Location)"*).
Then, you can export one file at a time from the *Attachment Queue*'s form view, or export all the *Attachments Queues* in a pending state related to the same *Export Task* from the given *Export Task* form view (menu *Settings > Technical > Attachments Export Tasks*) :
This module is part of the `akretion/server-tools <https://github.com/akretion/server-tools/tree/12-mig-external_file_location/attachment_synchronize>`_ project on GitHub.
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/12.0/attachment_synchronize>`_ project on GitHub.
You are welcome to contribute.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
This module allow you to deal with remote communication to import/export files.
It allow to store paths and settings from/to remote servers.
This module allows to **import/export files** from/to backend servers.
It depends of attachment_queue to store attachments
A backend server is defined by the basic `storage_backend <https://github.com/OCA/storage/tree/12.0/storage_backend>`_ OCA module, while it can be configured (amazon S3, sftp,...) with additional modules from the `storage <https://github.com/oca/storage>`_ repository.
With additional modules coming from https://github.com/storage you can use ftp, sftp, etc
The imported files (and the files to be exported) are stored in Odoo as ``attachment.queue`` objects, defined by the `attachment_queue <https://github.com/OCA/server-tools/tree/12.0/attachment_queue>`_ module while the importation itself (resp. exportation) is realized by **"Attachments Import Tasks"** (resp. "Attachments Export Tasks") defined by this current module.
As importation and exportation are different processes, they are triggered in different ways :
**To import files**, you need to create an *"Attachment Import Task"* (menu *Settings > Technical > Attachments Import Tasks*) which defines :
- where to find the files to import from the backend server (path to the files, selection pattern)
- what to do with the source files in the backend server (avoid duplicates, delete/rename after import...)
- how the files will be processed once imported (through the **File Type** field).
..image:: ../static/description/import_task.png
..epigraph::
🔎 The **File Type** options are defined by other modules built to process the Attachments Queues with the same "File Type".
**To export files**, you need first to register them as *"Attachments Queues"* objects linked to an *"Attachment Export Task"* (which set automatically their **File Type** to *"Export File (External Location)"*).
Then, you can export one file at a time from the *Attachment Queue*'s form view, or export all the *Attachments Queues* in a pending state related to the same *Export Task* from the given *Export Task* form view (menu *Settings > Technical > Attachments Export Tasks*) :
<p>This module allow you to deal with remote communication to import/export files.
It allow to store paths and settings from/to remote servers.</p>
<p>It depends of attachment_queue to store attachments</p>
<p>With additional modules coming from <aclass="reference external"href="https://github.com/storage">https://github.com/storage</a> you can use ftp, sftp, etc</p>
<p><aclass="reference external"href="https://odoo-community.org/page/development-status"><imgalt="Beta"src="https://img.shields.io/badge/maturity-Beta-yellow.png"/></a><aclass="reference external"href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><imgalt="License: AGPL-3"src="https://img.shields.io/badge/licence-AGPL--3-blue.png"/></a><aclass="reference external"href="https://github.com/OCA/server-tools/tree/12.0/attachment_synchronize"><imgalt="OCA/server-tools"src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github"/></a><aclass="reference external"href="https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-attachment_synchronize"><imgalt="Translate me on Weblate"src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png"/></a><aclass="reference external"href="https://runbot.odoo-community.org/runbot/149/12.0"><imgalt="Try me on Runbot"src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png"/></a></p>
<p>This module allows to <strong>import/export files</strong> from/to backend servers.</p>
<p>A backend server is defined by the basic <aclass="reference external"href="https://github.com/OCA/storage/tree/12.0/storage_backend">storage_backend</a> OCA module, while it can be configured (amazon S3, sftp,…) with additional modules from the <aclass="reference external"href="https://github.com/oca/storage">storage</a> repository.</p>
<p>The imported files (and the files to be exported) are stored in Odoo as <ttclass="docutils literal">attachment.queue</tt> objects, defined by the <aclass="reference external"href="https://github.com/OCA/server-tools/tree/12.0/attachment_queue">attachment_queue</a> module while the importation itself (resp. exportation) is realized by <strong>“Attachments Import Tasks”</strong> (resp. “Attachments Export Tasks”) defined by this current module.</p>
<p>As importation and exportation are different processes, they are triggered in different ways :</p>
<p><strong>To import files</strong>, you need to create an <em>“Attachment Import Task”</em> (menu <em>Settings > Technical > Attachments Import Tasks</em>) which defines :</p>
<ulclass="simple">
<li>Add a location with your server infos</li>
<li>Create a task with your file info and remote communication method</li>
<li>A cron task will trigger each task</li>
<li>where to find the files to import from the backend server (path to the files, selection pattern)</li>
<li>what to do with the source files in the backend server (avoid duplicates, delete/rename after import…)</li>
<li>how the files will be processed once imported (through the <strong>File Type</strong> field).</li>
🔎 The <strong>File Type</strong> options are defined by other modules built to process the Attachments Queues with the same “File Type”.</blockquote>
<p><strong>To export files</strong>, you need first to register them as <em>“Attachments Queues”</em> objects linked to an <em>“Attachment Export Task”</em> (which set automatically their <strong>File Type</strong> to <em>“Export File (External Location)”</em>).</p>
<p>Then, you can export one file at a time from the <em>Attachment Queue</em>’s form view, or export all the <em>Attachments Queues</em> in a pending state related to the same <em>Export Task</em> from the given <em>Export Task</em> form view (menu <em>Settings > Technical > Attachments Export Tasks</em>) :</p>
<aclass="reference external image-reference"href="https://odoo-community.org"><imgalt="Odoo Community Association"src="https://odoo-community.org/logo.png"/></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
<p>This module is part of the <aclass="reference external"href="https://github.com/akretion/server-tools/tree/12-mig-external_file_location/attachment_synchronize">akretion/server-tools</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
<p>This module is part of the <aclass="reference external"href="https://github.com/OCA/server-tools/tree/12.0/attachment_synchronize">OCA/server-tools</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <aclass="reference external"href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>