Skip to content

Commit

Permalink
Merge pull request #1966 from VoicuStefan2001/18.0-upd-deltatech_recc…
Browse files Browse the repository at this point in the history
…urent_task_activity

[18.0][MIG] deltatech_reccurent_task_activity
  • Loading branch information
VoicuStefan2001 authored Mar 5, 2025
2 parents 77e7727 + 02ab778 commit e4f8580
Show file tree
Hide file tree
Showing 12 changed files with 187 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ addon | version | maintainers | summary | price
[deltatech_purchase_stock](deltatech_purchase_stock/) | 18.0.1.0.2 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Purchase Stock | Free
[deltatech_purchase_xls](deltatech_purchase_xls/) | 18.0.1.0.7 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Import/export purchase line from/to Excel | Free
[deltatech_ral](deltatech_ral/) | 18.0.1.0.3 | | RAL | Free
[deltatech_reccurent_task_activity](deltatech_reccurent_task_activity/) | 18.0.0.0.0 | [![VoicuStefan2001](https://github.com/VoicuStefan2001.png?size=30px)](https://github.com/VoicuStefan2001) | Will automatically create an activity at the creation of the recurring task | Free
[deltatech_reception_note](deltatech_reception_note/) | 18.0.0.1.0 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Batch reception note | Free
[deltatech_record_type](deltatech_record_type/) | 18.0.1.0.4 | | Manage multiple record types | Free
[deltatech_report_packaging](deltatech_report_packaging/) | 18.0.1.0.1 | [![cojocariudaniel1](https://github.com/cojocariudaniel1.png?size=30px)](https://github.com/cojocariudaniel1) [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Report Packaging | Free
Expand Down
70 changes: 70 additions & 0 deletions deltatech_reccurent_task_activity/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
=================================
Create activity on recurring task
=================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:10a07d77af2e83db03e876e4e99fd844369a85b017b97d14ce75e98ed0482b72
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-OPL--1-blue.png
:target: https://www.odoo.com/documentation/master/legal/licenses.html
:alt: License: OPL-1
.. |badge3| image:: https://img.shields.io/badge/github-dhongu%2Fdeltatech-lightgray.png?logo=github
:target: https://github.com/dhongu/deltatech/tree/18.0/deltatech_reccurent_task_activity
:alt: dhongu/deltatech

|badge1| |badge2| |badge3|

Features:

- When a new recurring task is created, the system will automatically
create a new activity for each occurrence of the recurring task.
- The first occurrence of the task will not create activities , but all
the subsequent occurrences will create activities.
- Activities will be created for each user assigned to the task.
- IMPORTANT: mail.mail_activity_data_todo is the implicit activity type
and it is required for the module to work

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `Terrabit Issues <https://www.terrabit.ro/helpdesk>`_.
In case of trouble, please check there if your issue has already been reported.

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

Credits
=======

Authors
-------

* Terrabit
* Voicu Stefan

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

.. |maintainer-VoicuStefan2001| image:: https://github.com/VoicuStefan2001.png?size=40px
:target: https://github.com/VoicuStefan2001
:alt: VoicuStefan2001

Current maintainer:

|maintainer-VoicuStefan2001|

This module is part of the `dhongu/deltatech <https://github.com/dhongu/deltatech/tree/18.0/deltatech_reccurent_task_activity>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions deltatech_reccurent_task_activity/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions deltatech_reccurent_task_activity/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Create activity on recurring task",
"version": "18.0.0.0.0",
"author": "Terrabit, Voicu Stefan",
"website": "https://www.terrabit.ro",
"category": "Project",
"summary": "Will automatically create an activity at the creation of the recurring task",
"depends": ["project", "mail"],
"license": "OPL-1",
"data": [],
"images": ["static/description/main_screenshot.png"],
"development_status": "Beta",
"maintainers": ["VoicuStefan2001"],
}
1 change: 1 addition & 0 deletions deltatech_reccurent_task_activity/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import project_task
23 changes: 23 additions & 0 deletions deltatech_reccurent_task_activity/models/project_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from odoo import api, models


class ProjectTask(models.Model):
_inherit = "project.task"

@api.model_create_multi
def create(self, vals_list):
tasks = super().create(vals_list)
for task in tasks:
if task.recurring_task:
for user in task.user_ids:
self.env["mail.activity"].create(
{
"res_model_id": self.env.ref("project.model_project_task").id,
"res_id": task.id,
"activity_type_id": self.env.ref("mail.mail_activity_data_todo").id,
"summary": task.name,
"user_id": user.id,
"date_deadline": task.date_deadline,
}
)
return tasks
3 changes: 3 additions & 0 deletions deltatech_reccurent_task_activity/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
8 changes: 8 additions & 0 deletions deltatech_reccurent_task_activity/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Features:

- When a new recurring task is created, the system will automatically create a new activity for each occurrence of the
recurring task.
- The first occurrence of the task will not create activities , but all the subsequent occurrences will create
activities.
- Activities will be created for each user assigned to the task.
- IMPORTANT: mail.mail_activity_data_todo is the implicit activity type and it is required for the module to work
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions deltatech_reccurent_task_activity/static/description/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Create activity on recurring task</title>
<link rel="stylesheet" href="https://fossies.org/linux/docutils/docutils/writers/html4css1/html4css1.css" type="text/css" />
</head>
<body>
<div class="document" id="create-activity-on-recurring-task">
<h1 class="title">Create activity on recurring task</h1>

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:10a07d77af2e83db03e876e4e99fd844369a85b017b97d14ce75e98ed0482b72
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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="https://www.odoo.com/documentation/master/legal/licenses.html"><img alt="License: OPL-1" src="https://img.shields.io/badge/licence-OPL--1-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/dhongu/deltatech/tree/18.0/deltatech_reccurent_task_activity"><img alt="dhongu/deltatech" src="https://img.shields.io/badge/github-dhongu%2Fdeltatech-lightgray.png?logo=github" /></a></p>
<p>Features:</p>
<ul class="simple">
<li>When a new recurring task is created, the system will automatically
create a new activity for each occurrence of the recurring task.</li>
<li>The first occurrence of the task will not create activities , but all
the subsequent occurrences will create activities.</li>
<li>Activities will be created for each user assigned to the task.</li>
<li>IMPORTANT: mail.mail_activity_data_todo is the implicit activity type
and it is required for the module to work</li>
</ul>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-4">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://www.terrabit.ro/helpdesk">Terrabit Issues</a>.
In case of trouble, please check there if your issue has already been reported.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<ul class="simple">
<li>Terrabit</li>
<li>Voicu Stefan</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-4">Maintainers</a></h2>
<p>Current maintainer:</p>
<p><a class="reference external image-reference" href="https://github.com/VoicuStefan2001"><img alt="VoicuStefan2001" src="https://github.com/VoicuStefan2001.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/dhongu/deltatech/tree/18.0/deltatech_reccurent_task_activity">dhongu/deltatech</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
</div>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e4f8580

Please sign in to comment.