TIP: You can type at any time to perform a new search.
Attachment Synchronize
attachment_synchronize · OCA/server-tools
- Repository
- OCA/server-tools · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Generic Modules
- Folder size
- 0.25 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/server-tools
- Last tracking update
- 2026-08-07 08:42:58
- Authors
- Akretion, Odoo Community Association (OCA)
- Maintainers
- Akretion, Odoo Community Association (OCA)
- Committers
- Florian da Costa, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- openupgradelib, requests, fsspec>=2024.5.0
- System dependencies
- None
- Required by
- None
- Description
This module allows to **import/export files** from/to backend servers. A backend server is defined by the basic [fs_storage](https://github.com/OCA/storage/tree/16.0/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](https://github.com/OCA/server-tools/tree/16.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.
Code Analysis ⓘ
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)
New fields (4)
-
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')
New fields (16)
-
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
New fields (3)
-
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…
- Status
- Open migration PR — not merged yet for this version
- CI status
- green — ready to merge
- Open since
- 92 days ago
- Last activity
- 59 days ago
- Repository
- OCA/server-tools
- Pull request
- [19.0][MIG] attachment_synchronize: Migration to 19.0 (#3615)