Attachment Synchronize
attachment_synchronize · OCA/server-tools
-
Security25/25No findings
-
Activity12/25Last human commit 14 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 4 Odoo series since 12.0
Heuristic over the facts below, not an audit · How it's computed
Description
This module allows to import/export files from/to backend servers.
A backend server is defined by the basic fs_storage OCA module, while it can be configured (amazon S3, sftp,...) with additional modules fs python libraries
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.
Dependencies
- Odoo dependencies
- Python dependencies
- openupgradelib, requests, fsspec>=2024.5.0
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 7
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
attachment_queue_view_search |
attachment.queue | search | Inherits attachment_queue.view_attachment_queue_search | |
view_attachment_queue_form |
attachment.queue | form | Inherits attachment_queue.view_attachment_queue_form | |
view_attachment_queue_list |
attachment.queue | list | Inherits attachment_queue.view_attachment_queue_list | |
view_attachment_task_form |
attachment.synchronize.task | form | New | |
view_attachment_task_list |
attachment.synchronize.task | list | New | |
view_attachment_task_search |
attachment.synchronize.task | search | New | |
view_fs_storage_form |
fs.storage | form | Inherits fs_storage.fs_storage_form_view |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
-
file_typeSelectionselection_add=[('export', 'Export File (External location)')] -
fs_storage_idMany2one → fs.storagerelated='task_id.backend_id'store=Truestring='Filestore Storage' args: 'fs.storage' -
method_typeSelectionrelated='task_id.method_type' -
task_idMany2one → attachment.synchronize.taskstring='Task' args: 'attachment.synchronize.task'
-
onchange_task_id(self)@api.onchange('task_id')
-
activeBooleandefault=True args: 'Enabled' -
after_importSelectionhelp='Action after import a file'selection=[('rename', 'Rename'), ('move', 'Move'), ('move_rename', 'Move & Rename'), ('delete', 'Delete')] -
attachment_idsOne2many → attachment.queuestring='Attachment' args: 'attachment.queue', 'task_id' -
avoid_duplicated_filesBooleanhelp='If checked, a file will not be imported if an Attachment Queue with the same name already exists.'string='Avoid importing duplicated files' -
backend_idMany2one → fs.storagestring='Backend' args: 'fs.storage' -
count_attachment_doneIntegercompute='_compute_count_state' -
count_attachment_failedIntegercompute='_compute_count_state' -
count_attachment_pendingIntegercompute='_compute_count_state' -
failure_emailsCharhelp="Used to fill the 'Failure Emails' field in the 'Attachments Queues' related to this task.\nAn alert will be sent to these emails if any operation on these Attachment Queue's file type fails." -
file_typeSelectionhelp="Used to fill the 'File Type' field in the imported 'Attachments Queues'.\nFurther operations will be realized on these Attachments Queues depending on their 'File Type' value."selection=[] -
filepathCharhelp='Path to imported/exported files in the Backend'string='File Path' -
method_typeSelectionrequired=True args: [('import', 'Import Task'), ('export', 'Export Task')] -
move_pathCharhelp='Imported File will be moved to this path' -
nameCharrequired=True -
new_nameCharhelp="Imported File will be renamed to this name.\nNew Name can use 'mako' template where 'obj' is the original file's name.\nFor instance : ${obj.name}-${obj.create_date}.csv" -
patternCharhelp="Pattern used to select the files to be imported following the 'fnmatch' special characters (e.g. '*.txt' to catch all the text files).\nIf empty, import all the files found in 'File Path'."string='Selection Pattern'
-
button_duplicate_record(self) -
copy(self, default=None) -
run(self) -
run_export(self) -
run_import(self) -
run_task_import_scheduler(self, domain=None)@api.model
-
export_task_countIntegercompute='_compute_export_task_count' args: 'Export Tasks' -
import_task_countIntegercompute='_compute_import_task_count' args: 'Import Tasks' -
synchronize_task_idsOne2many → attachment.synchronize.taskstring='Tasks' args: 'attachment.synchronize.task', 'backend_id'
-
action_related_export_task(self) -
action_related_import_task(self)
Loading…
Loading…
Loading…
Loading…