mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 11:12:04 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- Copyright (C) 2022 Akretion (<http://www.akretion.com>).
|
||||
@author Kévin Roche <kevin.roche@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_model_form" model="ir.ui.view">
|
||||
<field name="name">tracking.ir.model form</field>
|
||||
<field name="model">ir.model</field>
|
||||
<field name="inherit_id" ref="base.view_model_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet/group[1]" position="after">
|
||||
|
||||
<group string="Custom Tracking">
|
||||
<group>
|
||||
<field name="active_custom_tracking" string="Active" />
|
||||
<field
|
||||
name="automatic_custom_tracking"
|
||||
string="Automatic configuration"
|
||||
attrs="{'invisible': [('active_custom_tracking', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="automatic_custom_tracking_domain"
|
||||
string="Domain"
|
||||
attrs="{
|
||||
'invisible': [('automatic_custom_tracking', '=', False)],
|
||||
'required': [('automatic_custom_tracking', '=', True)],
|
||||
}"
|
||||
/>
|
||||
<label
|
||||
for="update_custom_tracking"
|
||||
string="Update fields configuration"
|
||||
attrs="{'invisible': [('automatic_custom_tracking', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
name="update_custom_tracking"
|
||||
string="Update"
|
||||
icon="fa-refresh"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
attrs="{'invisible': [('automatic_custom_tracking', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//sheet/group[1]" position="before">
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="%(ir_model_fields_action)d"
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
icon="fa-server"
|
||||
attrs="{'invisible': [('active_custom_tracking', '=', False)]}"
|
||||
>
|
||||
<field
|
||||
name="tracked_field_count"
|
||||
widget="statinfo"
|
||||
string="Tracked Fields"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- Copyright (C) 2022 Akretion (<http://www.akretion.com>).
|
||||
@author Kévin Roche <kevin.roche@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record model="ir.actions.act_window" id="ir_model_fields_action">
|
||||
<field name="name">Trackable Fields</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">ir.model.fields</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field
|
||||
name="domain"
|
||||
>[("trackable", "=", True), ("model_id", "=", context['active_id']), ("ttype", "!=", "binary")]</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="target">current</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_model_fields_view_tree_custom_tracking" model="ir.ui.view">
|
||||
<field name="model">ir.model.fields</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom" create="0" delete="0" duplicate="0">
|
||||
<field name="name" readonly="True" />
|
||||
<field name="field_description" readonly="True" />
|
||||
<field name="ttype" readonly="True" />
|
||||
<field name="native_tracking" readonly="True" />
|
||||
<field name="custom_tracking" widget="boolean_toggle" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_model_fields_action_view" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="2" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="ir_model_fields_view_tree_custom_tracking" />
|
||||
<field name="act_window_id" ref="ir_model_fields_action" />
|
||||
</record>
|
||||
|
||||
<record id="view_model_track_fields_search" model="ir.ui.view">
|
||||
<field name="name">ir.model.fields.search</field>
|
||||
<field name="model">ir.model.fields</field>
|
||||
<field name="inherit_id" ref="base.view_model_fields_search" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='translate']" position="after">
|
||||
<filter
|
||||
name="tracking_on"
|
||||
string="Custom Tracking ON"
|
||||
domain="[('custom_tracking','=', True)]"
|
||||
/>
|
||||
<filter
|
||||
name="tracking_off"
|
||||
string="Custom Tracking OFF"
|
||||
domain="[('custom_tracking','=', False)]"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- Copyright (C) 2022 Akretion (<http://www.akretion.com>).
|
||||
@author Kévin Roche <kevin.roche@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<template id="track_o2m_m2m_template">
|
||||
<div>
|
||||
<ul>
|
||||
<t t-foreach="lines" t-as="line">
|
||||
<li>
|
||||
<b>
|
||||
<t t-esc="line.get('name')" />: </b>
|
||||
<br />
|
||||
<t t-foreach="line.get('messages')" t-as="message">
|
||||
<ul>
|
||||
<t t-if="message.get('mode', False) == 'create'">
|
||||
<b>New :</b>
|
||||
</t>
|
||||
<t t-if="message.get('mode', False) == 'unlink'">
|
||||
<b>Delete :</b>
|
||||
</t>
|
||||
<t t-if="message.get('mode', False) == 'update'">
|
||||
<b>Change :</b>
|
||||
</t>
|
||||
<t t-esc="message.get('record')" />
|
||||
<t t-if="message.get('mode', False) == 'update'">
|
||||
<ul>
|
||||
<t
|
||||
t-foreach="message.get('changes')"
|
||||
t-as="change"
|
||||
>
|
||||
<li>
|
||||
<t t-esc="change.get('name')" /> :
|
||||
<t t-esc="change.get('old')" />
|
||||
<div
|
||||
class="o_Message_trackingValueSeparator o_Message_trackingValueItem fa fa-long-arrow-right"
|
||||
title="Changed"
|
||||
role="img"
|
||||
/>
|
||||
<t t-esc="change.get('new')" />
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</t>
|
||||
</ul>
|
||||
</t>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue