Skip to content

Commit

Permalink
Merge pull request #1708 from OCA/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/server-tools (16.0)
  • Loading branch information
bt-admin authored Jan 26, 2025
2 parents a2917ec + 7e59fd2 commit 919fb07
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ addon | version | maintainers | summary
[sequence_python](sequence_python/) | 16.0.1.0.0 | | Calculate a sequence number from a Python expression
[server_action_logging](server_action_logging/) | 16.0.1.0.0 | | Module that provides a logging mechanism for server actions
[session_db](session_db/) | 16.0.1.0.6 | [![sbidoul](https://github.com/sbidoul.png?size=30px)](https://github.com/sbidoul) | Store sessions in DB
[tracking_manager](tracking_manager/) | 16.0.1.1.7 | [![Kev-Roche](https://github.com/Kev-Roche.png?size=30px)](https://github.com/Kev-Roche) [![sebastienbeau](https://github.com/sebastienbeau.png?size=30px)](https://github.com/sebastienbeau) | This module tracks all fields of a model, including one2many and many2many ones.
[tracking_manager](tracking_manager/) | 16.0.1.1.8 | [![Kev-Roche](https://github.com/Kev-Roche.png?size=30px)](https://github.com/Kev-Roche) [![sebastienbeau](https://github.com/sebastienbeau.png?size=30px)](https://github.com/sebastienbeau) | This module tracks all fields of a model, including one2many and many2many ones.
[upgrade_analysis](upgrade_analysis/) | 16.0.1.2.0 | [![StefanRijnhart](https://github.com/StefanRijnhart.png?size=30px)](https://github.com/StefanRijnhart) [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | Performs a difference analysis between modules installed on two different Odoo instances
[url_attachment_search_fuzzy](url_attachment_search_fuzzy/) | 16.0.1.0.0 | [![mariadforgelow](https://github.com/mariadforgelow.png?size=30px)](https://github.com/mariadforgelow) | Fuzzy Search of URL in Attachments

Expand Down
2 changes: 1 addition & 1 deletion tracking_manager/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tracking Manager
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b231e128bb218863f9b542a551652904b428baca98def5a9f314c67c578d1908
!! source digest: sha256:7e306300206048b2047afff4fe921b775b00a7a729541eb9fda3493170ab9aef
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
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": "16.0.1.1.7",
"version": "16.0.1.1.8",
"category": "Tools",
"website": "https://github.com/OCA/server-tools",
"author": "Akretion, Odoo Community Association (OCA)",
Expand Down
23 changes: 16 additions & 7 deletions tracking_manager/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,22 @@ def _tm_notify_owner(self, mode, changes=None):
)
for field_name, owner_field_name in self._tm_get_fields_to_notify():
owner = self[field_name]
data[owner._name][owner.id][owner_field_name].append(
{
"mode": mode,
"record": self.display_name,
"changes": changes,
}
)
model_name = target_id = False
if isinstance(owner, models.BaseModel):
model_name = owner._name
target_id = owner.id
# In case of specific O2M (ex: ir.attachment with res_id)
elif isinstance(owner, int) and hasattr(self, "res_model"):
model_name = self.res_model
target_id = owner
if model_name and target_id:
data[model_name][target_id][owner_field_name].append(
{
"mode": mode,
"record": self.display_name,
"changes": changes,
}
)

def _tm_get_field_description(self, field_name):
return self._fields[field_name].get_description(self.env)["string"]
Expand Down
2 changes: 1 addition & 1 deletion tracking_manager/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Tracking Manager</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b231e128bb218863f9b542a551652904b428baca98def5a9f314c67c578d1908
!! source digest: sha256:7e306300206048b2047afff4fe921b775b00a7a729541eb9fda3493170ab9aef
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/16.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-16-0/server-tools-16-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=16.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.
Expand Down

0 comments on commit 919fb07

Please sign in to comment.