diff --git a/attachment_synchronize/README.rst b/attachment_synchronize/README.rst index 35b73a977..4da14ae51 100644 --- a/attachment_synchronize/README.rst +++ b/attachment_synchronize/README.rst @@ -13,50 +13,59 @@ Attachment Synchronize .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fserver--tools-lightgray.png?logo=github - :target: https://github.com/akretion/server-tools/tree/12-mig-external_file_location/attachment_synchronize - :alt: akretion/server-tools +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github + :target: https://github.com/OCA/server-tools/tree/12.0/attachment_synchronize + :alt: OCA/server-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-attachment_synchronize + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/149/12.0 + :alt: Try me on Runbot -|badge1| |badge2| |badge3| +|badge1| |badge2| |badge3| |badge4| |badge5| -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 `_ OCA module, while it can be configured (amazon S3, sftp,...) with additional modules from the `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 `_ 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). -.. figure:: https://raw.githubusercontent.com/akretion/server-tools/12-mig-external_file_location/attachment_synchronize/static/description/file.png +.. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/attachment_synchronize/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". -.. figure:: https://raw.githubusercontent.com/akretion/server-tools/12-mig-external_file_location/attachment_synchronize/static/description/sftp.png +**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*) : -With the help of storage_backend_sftp +.. image:: https://raw.githubusercontent.com/OCA/server-tools/12.0/attachment_synchronize/static/description/export_task.png Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +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 smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -76,6 +85,7 @@ Contributors - Valentin CHEMIERE - Mourad EL HADJ MIMOUNE - Florian DA COSTA +- Clément MOMBEREAU GS Lab: @@ -84,6 +94,16 @@ GS Lab: 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. + .. |maintainer-florian-dacosta| image:: https://github.com/florian-dacosta.png?size=40px :target: https://github.com/florian-dacosta :alt: florian-dacosta @@ -94,10 +114,10 @@ Maintainers :target: https://github.com/bealdav :alt: bealdav -Current maintainers: +Current `maintainers `__: |maintainer-florian-dacosta| |maintainer-GSLabIt| |maintainer-bealdav| -This module is part of the `akretion/server-tools `_ project on GitHub. +This module is part of the `OCA/server-tools `_ project on GitHub. -You are welcome to contribute. +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/attachment_synchronize/__manifest__.py b/attachment_synchronize/__manifest__.py index 62db290b0..2c8dfa80d 100644 --- a/attachment_synchronize/__manifest__.py +++ b/attachment_synchronize/__manifest__.py @@ -10,7 +10,10 @@ "website": "https://github.com/oca/server-tools", "license": "AGPL-3", "category": "Generic Modules", - "depends": ["attachment_queue", "storage_backend"], + "depends": [ + "attachment_queue", + "storage_backend", # https://github.com/OCA/storage + ], "data": [ "views/attachment_queue_views.xml", "views/attachment_synchronize_task_views.xml", diff --git a/attachment_synchronize/models/attachment_synchronize_task.py b/attachment_synchronize/models/attachment_synchronize_task.py index b682a6d4c..257b3c21e 100644 --- a/attachment_synchronize/models/attachment_synchronize_task.py +++ b/attachment_synchronize/models/attachment_synchronize_task.py @@ -55,7 +55,9 @@ class AttachmentSynchronizeTask(models.Model): ) pattern = fields.Char( string="Selection Pattern", - help="Used to select the files to be imported. If empty, import all the files.", + help="Pattern used to select the files to be imported following the 'fnmatch' " + "special characters (e.g. '*.txt' to catch all the text files).\n" + "If empty, import all the files found in 'File Path'.", ) filepath = fields.Char( string="File Path", help="Path to imported/exported files in the Backend" @@ -67,10 +69,9 @@ class AttachmentSynchronizeTask(models.Model): ) new_name = fields.Char( string="New Name", - help="Imported File will be renamed to this name\n" - "Name can use mako template where obj is an " - "ir_attachement. template exemple : " - " ${obj.name}-${obj.create_date}.csv", + help="Imported File will be renamed to this name.\n" + "New Name can use 'mako' template where 'obj' is the original file's name.\n" + "For instance : ${obj.name}-${obj.create_date}.csv", ) after_import = fields.Selection( selection=[ @@ -95,8 +96,8 @@ class AttachmentSynchronizeTask(models.Model): ) failure_emails = fields.Char( string="Failure Emails", - help="Used to fill the field 'Failure Emails' in the task related " - "Attachments Queues.\nThese emails will be notified if any operation on these " + help="Used to fill the 'Failure Emails' fields in the 'Attachments Queues' " + "related to this task.\nThese emails will be notified if any operation on these " "Attachment Queue's file type fails.", ) diff --git a/attachment_synchronize/readme/CONFIGURE.rst b/attachment_synchronize/readme/CONFIGURE.rst deleted file mode 100644 index 12b91d76b..000000000 --- a/attachment_synchronize/readme/CONFIGURE.rst +++ /dev/null @@ -1,15 +0,0 @@ -To use this module, you need to: - -* 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 - - -.. figure:: ../static/description/file.png - - - -.. figure:: ../static/description/sftp.png - - -With the help of storage_backend_sftp \ No newline at end of file diff --git a/attachment_synchronize/readme/CONTRIBUTORS.rst b/attachment_synchronize/readme/CONTRIBUTORS.rst index 95bbd0811..f48f581a3 100644 --- a/attachment_synchronize/readme/CONTRIBUTORS.rst +++ b/attachment_synchronize/readme/CONTRIBUTORS.rst @@ -3,6 +3,7 @@ - Valentin CHEMIERE - Mourad EL HADJ MIMOUNE - Florian DA COSTA +- Clément MOMBEREAU GS Lab: diff --git a/attachment_synchronize/readme/DESCRIPTION.rst b/attachment_synchronize/readme/DESCRIPTION.rst index db1469eab..a161774b6 100644 --- a/attachment_synchronize/readme/DESCRIPTION.rst +++ b/attachment_synchronize/readme/DESCRIPTION.rst @@ -1,6 +1,5 @@ -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 `_ OCA module, while it can be configured (amazon S3, sftp,...) with additional modules from the `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 `_ module while the importation itself (resp. exportation) is realized by **"Attachments Import Tasks"** (resp. "Attachments Export Tasks") defined by this current module. diff --git a/attachment_synchronize/readme/USAGE.rst b/attachment_synchronize/readme/USAGE.rst new file mode 100644 index 000000000..f4714693d --- /dev/null +++ b/attachment_synchronize/readme/USAGE.rst @@ -0,0 +1,19 @@ +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*) : + +.. image:: ../static/description/export_task.png diff --git a/attachment_synchronize/static/description/export_task.png b/attachment_synchronize/static/description/export_task.png new file mode 100644 index 000000000..8e8bc8834 Binary files /dev/null and b/attachment_synchronize/static/description/export_task.png differ diff --git a/attachment_synchronize/static/description/file.png b/attachment_synchronize/static/description/file.png deleted file mode 100644 index a8617a0af..000000000 Binary files a/attachment_synchronize/static/description/file.png and /dev/null differ diff --git a/attachment_synchronize/static/description/import_task.png b/attachment_synchronize/static/description/import_task.png new file mode 100644 index 000000000..9aee76f57 Binary files /dev/null and b/attachment_synchronize/static/description/import_task.png differ diff --git a/attachment_synchronize/static/description/index.html b/attachment_synchronize/static/description/index.html index 026575aa0..f378652c7 100644 --- a/attachment_synchronize/static/description/index.html +++ b/attachment_synchronize/static/description/index.html @@ -367,15 +367,14 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 akretion/server-tools

-

This module allow you to deal with remote communication to import/export files. -It allow to store paths and settings from/to remote servers.

-

It depends of attachment_queue to store attachments

-

With additional modules coming from https://github.com/storage you can use ftp, sftp, etc

+

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runbot

+

This module allows to import/export files from/to backend servers.

+

A backend server is defined by the basic storage_backend OCA module, while it can be configured (amazon S3, sftp,…) with additional modules from the storage repository.

+

The imported files (and the files to be exported) are stored in Odoo as attachment.queue objects, defined by the 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

-
-

Configuration

-

To use this module, you need to:

+
+

Usage

+

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 :

    -
  • 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
  • +
  • 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).
-
-https://raw.githubusercontent.com/akretion/server-tools/12-mig-external_file_location/attachment_synchronize/static/description/file.png -
-
-https://raw.githubusercontent.com/akretion/server-tools/12-mig-external_file_location/attachment_synchronize/static/description/sftp.png -
-

With the help of storage_backend_sftp

+https://raw.githubusercontent.com/OCA/server-tools/12.0/attachment_synchronize/static/description/import_task.png +
+🔎 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) :

+https://raw.githubusercontent.com/OCA/server-tools/12.0/attachment_synchronize/static/description/export_task.png

Bug Tracker

-

Bugs are tracked on GitHub Issues. +

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 smashing it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -424,6 +423,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Valentin CHEMIERE
  • Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
  • Florian DA COSTA <florian.dacosta@akretion.com>
  • +
  • ClĂ©ment MOMBEREAU <clement.mombereau@akretion.com.br>
  • GS Lab:

      @@ -432,10 +432,15 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    Maintainers

    -

    Current maintainers:

    +

    This module is maintained by the OCA.

    +Odoo Community Association +

    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.

    +

    Current maintainers:

    florian-dacosta GSLabIt bealdav

    -

    This module is part of the akretion/server-tools project on GitHub.

    -

    You are welcome to contribute.

    +

    This module is part of the OCA/server-tools project on GitHub.

    +

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

    diff --git a/attachment_synchronize/static/description/sftp.png b/attachment_synchronize/static/description/sftp.png deleted file mode 100644 index 665d4258b..000000000 Binary files a/attachment_synchronize/static/description/sftp.png and /dev/null differ