Skip to content
Health
67/100
fair
  • Security25/25
    No findings
  • Activity12/25
    Last human commit 14 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 4 Odoo series since 12.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
3 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.25 MB
Module directory on disk
Code analysis 0 migration notes 3 models 7 views 0 HTTP endpoints

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
OCA/queue:
OCA/server-tools:
OCA/storage:
odoo/odoo:
- web
- bus
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 IDNameModelTypeStatus
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_type Selection
    selection_add=[('export', 'Export File (External location)')]
  • fs_storage_id Many2one → fs.storage
    related='task_id.backend_id' store=True string='Filestore Storage' args: 'fs.storage'
  • method_type Selection
    related='task_id.method_type'
  • task_id Many2one → attachment.synchronize.task
    string='Task' args: 'attachment.synchronize.task'
Public methods (1)
  • onchange_task_id(self)
    @api.onchange('task_id')

New fields (16)
  • active Boolean
    default=True args: 'Enabled'
  • after_import Selection
    help='Action after import a file' selection=[('rename', 'Rename'), ('move', 'Move'), ('move_rename', 'Move & Rename'), ('delete', 'Delete')]
  • attachment_ids One2many → attachment.queue
    string='Attachment' args: 'attachment.queue', 'task_id'
  • avoid_duplicated_files Boolean
    help='If checked, a file will not be imported if an Attachment Queue with the same name already exists.' string='Avoid importing duplicated files'
  • backend_id Many2one → fs.storage
    string='Backend' args: 'fs.storage'
  • count_attachment_done Integer
    compute='_compute_count_state'
  • count_attachment_failed Integer
    compute='_compute_count_state'
  • count_attachment_pending Integer
    compute='_compute_count_state'
  • failure_emails Char
    help="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_type Selection
    help="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=[]
  • filepath Char
    help='Path to imported/exported files in the Backend' string='File Path'
  • method_type Selection
    required=True args: [('import', 'Import Task'), ('export', 'Export Task')]
  • move_path Char
    help='Imported File will be moved to this path'
  • name Char
    required=True
  • new_name Char
    help="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"
  • pattern Char
    help="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'
Public methods (6)
  • 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_count Integer
    compute='_compute_export_task_count' args: 'Export Tasks'
  • import_task_count Integer
    compute='_compute_import_task_count' args: 'Import Tasks'
  • synchronize_task_ids One2many → attachment.synchronize.task
    string='Tasks' args: 'attachment.synchronize.task', 'backend_id'
Public methods (2)
  • action_related_export_task(self)
  • action_related_import_task(self)

Loading…

Loading…

Loading…

Loading…