Skip to content

Commit

Permalink
[18.0][MIG] tracking_manager: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BertVGroenendael committed Dec 6, 2024
1 parent 700e6d8 commit fed0eb6
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 35 deletions.
15 changes: 8 additions & 7 deletions tracking_manager/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Tracking Manager
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/17.0/tracking_manager
:target: https://github.com/OCA/server-tools/tree/18.0/tracking_manager
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-tracking_manager
:target: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-tracking_manager
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -63,16 +63,16 @@ Usage

|image1|

.. |image| image:: https://raw.githubusercontent.com/OCA/server-tools/17.0/tracking_manager/static/description/model_view.png
.. |image1| image:: https://raw.githubusercontent.com/OCA/server-tools/17.0/tracking_manager/static/description/fields.png
.. |image| image:: https://raw.githubusercontent.com/OCA/server-tools/18.0/tracking_manager/static/description/model_view.png
.. |image1| image:: https://raw.githubusercontent.com/OCA/server-tools/18.0/tracking_manager/static/description/fields.png

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20tracking_manager%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20tracking_manager%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -89,6 +89,7 @@ Contributors

- Kévin Roche <kevin.roche@akretion.com>
- Sébastien BEAU <sebastien.beau@akretion.com>
- Bert Van Groenendael <bert.vangroenendael@dynapps.eu>

Maintainers
-----------
Expand All @@ -114,6 +115,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-Kev-Roche| |maintainer-sebastienbeau|

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/17.0/tracking_manager>`_ project on GitHub.
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/18.0/tracking_manager>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion tracking_manager/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Tracking Manager",
"summary": """This module tracks all fields of a model,
including one2many and many2many ones.""",
"version": "17.0.1.0.7",
"version": "18.0.1.0.0",
"category": "Tools",
"website": "https://github.com/OCA/server-tools",
"author": "Akretion, Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion tracking_manager/models/ir_model_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def write(self, vals):
custom_tracking = None
if "custom_tracking" in vals:
self.env.registry.clear_cache()
self.check_access_rights("write")
self.check_access("write")
custom_tracking = vals.pop("custom_tracking")
self._write({"custom_tracking": custom_tracking})
self.invalidate_model(fnames=["custom_tracking"])
Expand Down
1 change: 1 addition & 0 deletions tracking_manager/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Kévin Roche \<<kevin.roche@akretion.com>\>
- Sébastien BEAU \<<sebastien.beau@akretion.com>\>
- Bert Van Groenendael \<<bert.vangroenendael@dynapps.eu>\>
11 changes: 6 additions & 5 deletions tracking_manager/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Tracking Manager</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:cea9e094d74e84905e8ab1a9e2bb31a558b71cf8cca9a897e11eedcd191c2f19
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/17.0/tracking_manager"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-tracking_manager"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/18.0/tracking_manager"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-tracking_manager"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to track all fields on every model that has a
chatter, including one2many and many2many ones. This excludes the
computed, readonly, related fields by default. In addition, line changes
Expand Down Expand Up @@ -407,18 +407,18 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
</ul>
</li>
</ul>
<p><img alt="image" src="https://raw.githubusercontent.com/OCA/server-tools/17.0/tracking_manager/static/description/model_view.png" /></p>
<p><img alt="image" src="https://raw.githubusercontent.com/OCA/server-tools/18.0/tracking_manager/static/description/model_view.png" /></p>
<ul class="simple">
<li>Then select the fields to track</li>
</ul>
<p><img alt="image1" src="https://raw.githubusercontent.com/OCA/server-tools/17.0/tracking_manager/static/description/fields.png" /></p>
<p><img alt="image1" src="https://raw.githubusercontent.com/OCA/server-tools/18.0/tracking_manager/static/description/fields.png" /></p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20tracking_manager%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20tracking_manager%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -434,6 +434,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Kévin Roche &lt;<a class="reference external" href="mailto:kevin.roche&#64;akretion.com">kevin.roche&#64;akretion.com</a>&gt;</li>
<li>Sébastien BEAU &lt;<a class="reference external" href="mailto:sebastien.beau&#64;akretion.com">sebastien.beau&#64;akretion.com</a>&gt;</li>
<li>Bert Van Groenendael &lt;<a class="reference external" href="mailto:bert.vangroenendael&#64;dynapps.eu">bert.vangroenendael&#64;dynapps.eu</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -447,7 +448,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/Kev-Roche"><img alt="Kev-Roche" src="https://github.com/Kev-Roche.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/sebastienbeau"><img alt="sebastienbeau" src="https://github.com/sebastienbeau.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/17.0/tracking_manager">OCA/server-tools</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/18.0/tracking_manager">OCA/server-tools</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
14 changes: 5 additions & 9 deletions tracking_manager/views/ir_model.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<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" />
Expand Down Expand Up @@ -43,25 +42,22 @@
</xpath>

<xpath expr="//sheet/group[1]" position="before">
<div class="oe_button_box" name="button_box">

<button
<div class="oe_button_box" name="button_box">
<button
name="%(ir_model_fields_action)d"
type="action"
class="oe_stat_button"
icon="fa-server"
invisible="not active_custom_tracking"
>
<field
<field
name="tracked_field_count"
widget="statinfo"
string="Tracked Fields"
/>
</button>
</div>
</button>
</div>
</xpath>

</field>
</record>

</odoo>
14 changes: 6 additions & 8 deletions tracking_manager/views/ir_model_fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
@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="view_mode">list,form</field>
<field
name="domain"
>[("trackable", "=", True), ("model_id", "=", context['active_id']), ("ttype", "!=", "binary")]</field>
Expand All @@ -19,19 +18,19 @@
<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">
<list 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>
</list>
</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_mode">list</field>
<field name="view_id" ref="ir_model_fields_view_tree_custom_tracking" />
<field name="act_window_id" ref="ir_model_fields_action" />
</record>
Expand All @@ -42,18 +41,17 @@
<field name="inherit_id" ref="base.view_model_fields_search" />
<field name="arch" type="xml">
<xpath expr="//filter[@name='translate']" position="after">
<filter
<filter
name="tracking_on"
string="Custom Tracking ON"
domain="[('custom_tracking','=', True)]"
/>
<filter
<filter
name="tracking_off"
string="Custom Tracking OFF"
domain="[('custom_tracking','=', False)]"
/>
</xpath>
</field>
</record>

</odoo>
8 changes: 4 additions & 4 deletions tracking_manager/views/message_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
<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"
/>
class="o_Message_trackingValueSeparator o_Message_trackingValueItem fa fa-long-arrow-right"
title="Changed"
role="img"
/>
<t t-esc="change.get('new')" />
</li>
</t>
Expand Down

0 comments on commit fed0eb6

Please sign in to comment.