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.
166 lines
8.3 KiB
166 lines
8.3 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_import" type="object" string="Run Import" class="oe_read_only oe_highlight" icon="fa-play-circle" attrs="{'invisible': ['|', ('method_type', '!=', 'import'), ('enabled','=', False)]}"/>
|
|
</header>
|
|
<header>
|
|
<button name="run_export" type="object" string="Run Export" class="oe_read_only oe_highlight" icon="fa-play-circle" attrs="{'invisible': ['|', ('method_type', '!=', 'export'), ('enabled','=', False)]}"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button name="button_toogle_enabled" type="object" class="oe_stat_button" icon="fa-check-square">
|
|
<field
|
|
name="enabled"
|
|
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" colspan="4">
|
|
<label class="oe_edit_only" for="name" string="Name"/>
|
|
<h1>
|
|
<field name="name" class="oe_inline"/>
|
|
</h1>
|
|
</div>
|
|
<group class="col-12 col-lg-6">
|
|
<field name="method_type"/>
|
|
<field name="backend_id"/>
|
|
<field name="filepath"/>
|
|
<field name="pattern" attrs="{'invisible':[('method_type','!=','import')]}"/>
|
|
</group>
|
|
<group name="action" string="Importation Settings" 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')]}"/>
|
|
</group>
|
|
<group string="Attachments">
|
|
<group>
|
|
<field name="file_type" attrs="{'invisible':[('method_type','!=','import')]}" />
|
|
<field name="emails" attrs="{'invisible':[('method_type','!=','import')]}" />
|
|
</group>
|
|
<field name="attachment_ids" domain="[('task_id', '=', id)]" nolabel="1" attrs="{'invisible':[('method_type','!=','export')]}"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_attachment_import_task_tree" model="ir.ui.view">
|
|
<field name="model">attachment.synchronize.task</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Tasks" decoration-muted="enabled == False">
|
|
<field name="name" select="1"/>
|
|
<field name="pattern"/>
|
|
<field name="filepath"/>
|
|
<field name="move_path"/>
|
|
<field name="after_import"/>
|
|
<field name="backend_id"/>
|
|
<field name="enabled" invisible="1"/>
|
|
<button name="button_duplicate_record" type="object" title="Copy" class="fa fa-clone"/>
|
|
<button name="button_toogle_enabled" type="object" title="Enable" class="fa fa-check-square"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_attachment_export_task_tree" model="ir.ui.view">
|
|
<field name="model">attachment.synchronize.task</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Tasks" decoration-muted="enabled == False">
|
|
<field name="name" select="1"/>
|
|
<field name="filepath"/>
|
|
<field name="backend_id"/>
|
|
<field name="enabled" invisible="1"/>
|
|
<button name="button_duplicate_record" type="object" title="Copy" class="fa fa-clone"/>
|
|
<button name="button_toogle_enabled" type="object" title="Enable" class="fa fa-check-square"/>
|
|
</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'}</field>
|
|
</record>
|
|
|
|
<record id="act_open_attachment_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">
|
|
<field eval="10" name="sequence"/>
|
|
<field name="view_mode">form</field>
|
|
<field name="view_id" ref="view_attachment_task_form"/>
|
|
<field name="act_window_id" ref="action_attachment_import_task"/>
|
|
</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'}</field>
|
|
</record>
|
|
|
|
<record id="act_open_attachment_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">
|
|
<field eval="10" name="sequence"/>
|
|
<field name="view_mode">form</field>
|
|
<field name="view_id" ref="view_attachment_task_form"/>
|
|
<field name="act_window_id" ref="action_attachment_export_task"/>
|
|
</record>
|
|
|
|
<menuitem id="menu_attachment_export_task"
|
|
parent="base.next_id_9"
|
|
sequence="22"
|
|
action="action_attachment_export_task"/>
|
|
|
|
</odoo>
|