Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_attachment_queue_form" model="ir.ui.view">
<field name="model">attachment.queue</field>
<field name="inherit_id" ref="attachment_queue.view_attachment_queue_form" />
<field name="arch" type="xml">
<!-- Add Related Task and Backend -->
<xpath expr="//field[@name='url']" position="after">
<field name="method_type" invisible="1" />
<field
name="task_id"
domain="[('method_type', '!=', 'import')]"
attrs="{'required': [('file_type', '=', 'export')], 'readonly': [('method_type', '=', 'import')]}"
/>
<field name="fs_storage_id" />
</xpath>
</field>
</record>
<record id="view_attachment_queue_tree" model="ir.ui.view">
<field name="model">attachment.queue</field>
<field name="inherit_id" ref="attachment_queue.view_attachment_queue_tree" />
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="decoration-muted">state == 'done'</attribute>
</xpath>
<xpath expr="//field[@name='file_type']" position="after">
<field name="task_id" />
<field name="fs_storage_id" />
</xpath>
</field>
</record>
<record id="attachment_queue_view_search" model="ir.ui.view">
<field name="model">attachment.queue</field>
<field name="inherit_id" ref="attachment_queue.view_attachment_queue_search" />
<field name="arch" type="xml">
<field name="type" position="after">
<field name="task_id" filter_domain="[('task_id.name','ilike',self)]" />
</field>
</field>
</record>
<record id="action_attachment_queue_related" model="ir.actions.act_window">
<field name="name">Attachments Queue</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">attachment.queue</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="False" />
<field name="domain">[('task_id', '=', active_id)]</field>
<field
name="search_view_id"
ref="attachment_queue.view_attachment_queue_search"
/>
</record>
</odoo>

View file

@ -0,0 +1,236 @@
<?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>
<field name="active" invisible="1" />
<widget
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
<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"
title="Failed attachments"
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"
title="Pending attachments"
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"
title="Done attachments"
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>
</div>
<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"
attrs="{'invisible':[('after_import','not in',('move', 'move_rename'))], 'required': [('after_import', 'in', ('move', 'move_rename'))]}"
/>
<field
name="new_name"
attrs="{'invisible': [('after_import','not in',('rename', 'move_rename'))], 'required': [('after_import', 'in', ('rename', '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 decoration-muted="active == False">
<field name="name" select="1" />
<field name="backend_id" />
<field name="filepath" />
<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"
title="Failed attachments"
context="{'search_default_failed': 1}"
/>
<field name="count_attachment_pending" string=" " />
<button
name="%(action_attachment_queue_related)d"
type="action"
icon="fa-spinner"
title="Pending attachments"
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"
title="Done attachments"
context="{'search_default_done': 1}"
/>
<field name="active" widget="boolean_toggle" />
<button
name="button_duplicate_record"
type="object"
icon="fa-clone"
title="Duplicate"
/>
</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)]"
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_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="fs_storage.menu_storage"
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_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="fs_storage.menu_storage"
sequence="22"
action="action_attachment_export_task"
/>
</odoo>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_fs_storage_form" model="ir.ui.view">
<field name="model">fs.storage</field>
<field name="inherit_id" ref="fs_storage.fs_storage_form_view" />
<field name="priority" eval="250" />
<field name="arch" type="xml">
<xpath expr="//div[hasclass('oe_title')]" position="before">
<div class="oe_button_box" name="button_box">
<button
class="oe_stat_button"
type="object"
attrs="{'invisible': [('import_task_count', '&lt;', 1)]}"
name="action_related_import_task"
icon="fa-download"
>
<field name="import_task_count" widget="statinfo" />
</button>
<button
class="oe_stat_button"
type="object"
attrs="{'invisible': [('export_task_count', '&lt;', 1)]}"
name="action_related_export_task"
icon="fa-upload"
>
<field name="export_task_count" widget="statinfo" />
</button>
</div>
</xpath>
</field>
</record>
</odoo>