From a3f4e52a3710f448fd7b77bf31fef6e2a2bb5f50 Mon Sep 17 00:00:00 2001 From: clementmbr Date: Wed, 8 Jul 2020 13:00:47 -0300 Subject: [PATCH] [IMP] task_id readonly if method_type import --- .../demo/attachment_synchronize_task_demo.xml | 7 +++++++ attachment_synchronize/models/attachment_queue.py | 1 + .../views/attachment_queue_views.xml | 12 +++++++++--- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/attachment_synchronize/demo/attachment_synchronize_task_demo.xml b/attachment_synchronize/demo/attachment_synchronize_task_demo.xml index 8742b8d06..d3f8b45f3 100644 --- a/attachment_synchronize/demo/attachment_synchronize_task_demo.xml +++ b/attachment_synchronize/demo/attachment_synchronize_task_demo.xml @@ -17,4 +17,11 @@ foo@example.org,bar@example.org + + bWlncmF0aW9uIHRlc3Q= + attachment_queue_imported_demo.doc + attachment_queue_imported_demo.doc + + + diff --git a/attachment_synchronize/models/attachment_queue.py b/attachment_synchronize/models/attachment_queue.py index 1047ee9f1..19c173761 100644 --- a/attachment_synchronize/models/attachment_queue.py +++ b/attachment_synchronize/models/attachment_queue.py @@ -9,6 +9,7 @@ class AttachmentQueue(models.Model): _inherit = "attachment.queue" task_id = fields.Many2one("attachment.synchronize.task", string="Task") + method_type = fields.Selection(related="task_id.method_type") storage_backend_id = fields.Many2one( "storage.backend", string="Storage Backend", diff --git a/attachment_synchronize/views/attachment_queue_views.xml b/attachment_synchronize/views/attachment_queue_views.xml index 49dc40985..226a6923f 100644 --- a/attachment_synchronize/views/attachment_queue_views.xml +++ b/attachment_synchronize/views/attachment_queue_views.xml @@ -5,10 +5,16 @@ attachment.queue - - + + + + - +