Skip to content

Commit

Permalink
Merge pull request #47 from kmee/14.0-deadline
Browse files Browse the repository at this point in the history
[NEW] mail_activity_deadline_track
  • Loading branch information
mileo authored Sep 15, 2024
2 parents 426caa9 + cf09d8b commit 6f72d1c
Show file tree
Hide file tree
Showing 11 changed files with 529 additions and 0 deletions.
63 changes: 63 additions & 0 deletions mail_activity_deadline_track/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
============================
Mail Activity Deadline Track
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:75ea4b493eb796b6ad06b9280ba7e7d46d6132e914bfb38298c25a18c98bba7b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-KMEE%2Fkmee--odoo--addons-lightgray.png?logo=github
:target: https://github.com/KMEE/kmee-odoo-addons/tree/14.0/mail_activity_deadline_track
:alt: KMEE/kmee-odoo-addons

|badge1| |badge2| |badge3|

When some one changes an activity deadline this module will create a
internal note informing that the date was changed.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/KMEE/kmee-odoo-addons/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/KMEE/kmee-odoo-addons/issues/new?body=module:%20mail_activity_deadline_track%0Aversion:%2014.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.

Credits
=======

Authors
-------

* KMEE

Contributors
------------

- ``KMEE <https://www.kmee.com.br>``\ \_\_:

- Luis Felipe Mileo [email protected]

Maintainers
-----------

This module is part of the `KMEE/kmee-odoo-addons <https://github.com/KMEE/kmee-odoo-addons/tree/14.0/mail_activity_deadline_track>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions mail_activity_deadline_track/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions mail_activity_deadline_track/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 KMEE
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Mail Activity Deadline Track",
"summary": """
Deadline Track""",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"maintainer": ["mileo"],
"author": "KMEE,Odoo Community Association (OCA)",
"website": "https://github.com/KMEE/kmee-odoo-addons",
"depends": [
"mail",
],
}
1 change: 1 addition & 0 deletions mail_activity_deadline_track/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import mail_activity
18 changes: 18 additions & 0 deletions mail_activity_deadline_track/models/mail_activity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2024 KMEE
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class MailActity(models.Model):
_inherit = "mail.activity"

def write(self, vals):
if "date_deadline" in vals:
if self.date_deadline != vals["date_deadline"]:
self.env[self.res_model].browse(self.res_id).message_post(
body=f"""Deadline alterado: {
self.summary or self.activity_type_id.name or ""
} \n {self.date_deadline} -> {vals['date_deadline']}"""
)
return super(MailActity, self).write(vals)
3 changes: 3 additions & 0 deletions mail_activity_deadline_track/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `KMEE <https://www.kmee.com.br>`__:

* Luis Felipe Mileo <[email protected]>
1 change: 1 addition & 0 deletions mail_activity_deadline_track/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When some one changes an activity deadline this module will create a internal note informing that the date was changed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6f72d1c

Please sign in to comment.