Browse Source

[FIX] duplicate ids in attachment_synchronize_task_views and flake8

12.0-mig-module_prototyper_last
clementmbr 5 years ago
committed by David Beal
parent
commit
d74441b08d
  1. 2
      attachment_synchronize/__manifest__.py
  2. 15
      attachment_synchronize/models/attachment_synchronize_task.py
  3. 8
      attachment_synchronize/views/attachment_synchronize_task_views.xml

2
attachment_synchronize/__manifest__.py

@ -12,7 +12,7 @@
"category": "Generic Modules",
"depends": [
"attachment_queue",
"storage_backend", # https://github.com/OCA/storage
"storage_backend", # https://github.com/OCA/storage
],
"data": [
"views/attachment_queue_views.xml",

15
attachment_synchronize/models/attachment_synchronize_task.py

@ -85,20 +85,21 @@ class AttachmentSynchronizeTask(models.Model):
file_type = fields.Selection(
selection=[],
string="File Type",
help="The file type allows Odoo to recognize what to do with the files "
"once imported.",
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.",
)
enabled = fields.Boolean("Enabled", default=True)
avoid_duplicated_files = fields.Boolean(
string="Avoid importing duplicated files",
help="If checked, a file will not be imported if there is already an "
"Attachment Queue with the same name.",
help="If checked, a file will not be imported if an Attachment Queue with the "
"same name already exists.",
)
failure_emails = fields.Char(
string="Failure Emails",
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.",
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.",
)
def _prepare_attachment_vals(self, data, filename):

8
attachment_synchronize/views/attachment_synchronize_task_views.xml

@ -123,14 +123,14 @@
<field name="context">{'default_method_type': 'import'}</field>
</record>
<record id="act_open_attachment_task_view_tree" model="ir.actions.act_window.view">
<record id="act_open_attachment_import_task_view_tree" model="ir.actions.act_window.view">
<field eval="10" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_attachment_import_task_tree"/>
<field name="act_window_id" ref="action_attachment_import_task"/>
</record>
<record id="act_open_attachment_task_view_form" model="ir.actions.act_window.view">
<record id="act_open_attachment_import_task_view_form" model="ir.actions.act_window.view">
<field eval="10" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_attachment_task_form"/>
@ -155,14 +155,14 @@
<field name="context">{'default_method_type': 'export'}</field>
</record>
<record id="act_open_attachment_task_view_tree" model="ir.actions.act_window.view">
<record id="act_open_attachment_export_task_view_tree" model="ir.actions.act_window.view">
<field eval="10" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_attachment_export_task_tree"/>
<field name="act_window_id" ref="action_attachment_export_task"/>
</record>
<record id="act_open_attachment_task_view_form" model="ir.actions.act_window.view">
<record id="act_open_attachment_export_task_view_form" model="ir.actions.act_window.view">
<field eval="10" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_attachment_task_form"/>

Loading…
Cancel
Save