You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
147 lines
8.2 KiB
147 lines
8.2 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<record id="view_attachment_task_form" model="ir.ui.view">
|
|
<field name="model">attachment.synchronize.task</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="run" type="object" string="Run" class="oe_read_only oe_highlight" icon="fa-play-circle" attrs="{'invisible': [('active','=', False)]}"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button name="%(action_attachment_queue_related)d" type="action" class="oe_stat_button" icon="fa-thumbs-o-down" context="{'search_default_failed': 1}">
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="count_attachment_failed" widget="statinfo" nolabel="1"/>
|
|
</span>
|
|
<span class="o_stat_text">Fail</span>
|
|
</div>
|
|
</button>
|
|
<button name="%(action_attachment_queue_related)d" type="action" class="oe_stat_button" icon="fa-spinner" context="{'search_default_pending': 1}">
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="count_attachment_pending" widget="statinfo" nolabel="1"/>
|
|
</span>
|
|
<span class="o_stat_text">Pending</span>
|
|
</div>
|
|
</button>
|
|
<button name="%(action_attachment_queue_related)d" type="action" class="oe_stat_button" icon="fa-thumbs-o-up" context="{'search_default_done': 1}">
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="count_attachment_done" widget="statinfo" nolabel="1"/>
|
|
</span>
|
|
<span class="o_stat_text">Success</span>
|
|
</div>
|
|
</button>
|
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
|
<field
|
|
name="active"
|
|
widget="boolean_button"
|
|
options="{'terminology': {
|
|
'string_true': 'Enabled',
|
|
'hover_true': "Disable",
|
|
'string_false': 'Disabled',
|
|
'hover_false': "Enable",
|
|
}}"
|
|
/>
|
|
</button>
|
|
</div>
|
|
<field name="method_type" invisible="1"/>
|
|
<div class="oe_title">
|
|
<label class="oe_edit_only" for="name" string="Name"/>
|
|
<h1>
|
|
<field name="name" class="oe_inline"/>
|
|
</h1>
|
|
<field name="create_date" invisible="1" />
|
|
<field name="method_type" widget="radio" options="{'horizontal': true}" attrs="{'readonly':[('create_date', '!=', False)]}"/>
|
|
</div>
|
|
<group string="Storage Location" class="col-12 col-lg-6">
|
|
<field name="backend_id"/>
|
|
<field name="filepath"/>
|
|
<field name="pattern" attrs="{'invisible':[('method_type','!=','import')]}"/>
|
|
</group>
|
|
<group name="action" string="Importation" attrs="{'invisible':[('method_type','!=','import')]}" class="col-12 col-lg-6">
|
|
<field name="avoid_duplicated_files" />
|
|
<field name="after_import" />
|
|
<field name="move_path" colspan="4" attrs="{'invisible':[('after_import','!=','move'), ('after_import','!=','move_rename')]}"/>
|
|
<field name="new_name" colspan="4" attrs="{'invisible': [('after_import','!=','rename'), ('after_import','!=','move_rename')]}"/>
|
|
<field name="file_type"/>
|
|
</group>
|
|
<group string="Notification">
|
|
<field name="failure_emails"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_attachment_task_tree" model="ir.ui.view">
|
|
<field name="model">attachment.synchronize.task</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Tasks" decoration-muted="active == False">
|
|
<field name="name" select="1"/>
|
|
<field name="backend_id"/>
|
|
<field name="filepath"/>
|
|
<field name="active" invisible="1"/>
|
|
<button name="run" type="object" string="Run" icon="fa-play-circle"/>
|
|
<field name="count_attachment_failed" string=" "/>
|
|
<button name="%(action_attachment_queue_related)d" type="action" icon="fa-thumbs-o-down" context="{'search_default_failed': 1}"/>
|
|
<field name="count_attachment_pending" string=" "/>
|
|
<button name="%(action_attachment_queue_related)d" type="action" icon="fa-spinner" context="{'search_default_pending': 1}"/>
|
|
<field name="count_attachment_done" string=" "/>
|
|
<button name="%(action_attachment_queue_related)d" type="action" icon="fa-thumbs-o-up" context="{'search_default_done': 1}"/>
|
|
<button name="button_duplicate_record" type="object" string="Copy" icon="fa-clone" invisible="not context.get('show_duplicate_button')"/>
|
|
<button name="toggle_active" type="object" string="Active/Inactive" icon="fa-archive" invisible="not context.get('show_toggle_active_button')"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_attachment_task_search" model="ir.ui.view">
|
|
<field name="model">attachment.synchronize.task</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Attachments">
|
|
<field name="name" filter_domain="['|', ('name','ilike',self), ('datas_fname','ilike',self)]" string="Attachment Task"/>
|
|
<field name="create_date"/>
|
|
<filter string="Backend" name="backend" context="{'group_by':'backend_id'}"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<!-- Attachments Import Tasks Menu -->
|
|
<record id="action_attachment_import_task" model="ir.actions.act_window">
|
|
<field name="name">Attachments Import Tasks</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">attachment.synchronize.task</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="view_id" eval="False"/>
|
|
<field name="search_view_id" ref="view_attachment_task_search"/>
|
|
<field name="domain">[('method_type', '=', 'import')]</field>
|
|
<field name="context">{'default_method_type': 'import', "active_test": False}</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_attachment_import_task"
|
|
parent="base.next_id_9"
|
|
sequence="21"
|
|
action="action_attachment_import_task"/>
|
|
|
|
<!-- Attachments Export Tasks Menu -->
|
|
<record id="action_attachment_export_task" model="ir.actions.act_window">
|
|
<field name="name">Attachments Export Tasks</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">attachment.synchronize.task</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="view_id" eval="False"/>
|
|
<field name="search_view_id" ref="view_attachment_task_search"/>
|
|
<field name="domain">[('method_type', '=', 'export')]</field>
|
|
<field name="context">{'default_method_type': 'export', "active_test": False}</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_attachment_export_task"
|
|
parent="base.next_id_9"
|
|
sequence="22"
|
|
action="action_attachment_export_task"/>
|
|
|
|
</odoo>
|