@ -0,0 +1,46 @@ |
|||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
|||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
Task Overdue Email Notification |
|||
=============================== |
|||
This app is used for Overdue task notifications by email. |
|||
|
|||
License |
|||
------- |
|||
GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
Developer: (v16)Anfas@cybrosys, |
|||
(v17)JANISH BABU EK@cybrosys, |
|||
(v18)Nivedhya T |
|||
|
|||
Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import models |
@ -0,0 +1,46 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
{ |
|||
'name': "Task Overdue Email Notification", |
|||
'version': "18.0.1.0.0", |
|||
'category': 'Project', |
|||
'summary': 'Send Email Reminders To The Assigned Users For Overdue Tasks', |
|||
'description': 'This app is used for Overdue task notifications by email. ' |
|||
'suggests that the app is designed to send notifications ' |
|||
'via email for tasks that are overdue', |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'depends': ['base', 'project'], |
|||
'data': [ |
|||
'data/mail_template_data.xml', |
|||
'data/ir_cron_data.xml', |
|||
'views/project_task_views.xml', |
|||
'views/res_config_settings_views.xml', |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Task Overdue Scheduled action--> |
|||
<record id="ir_cron_scheduler_overdue_action" model="ir.cron"> |
|||
<field name="name">Project Task Overdue Notification</field> |
|||
<field name="model_id" ref="model_project_task"/> |
|||
<field name="state">code</field> |
|||
<field name="code">model.action_overdue()</field> |
|||
<field name="user_id" ref="base.user_root"/> |
|||
<field name='interval_number'>1</field> |
|||
<field name='interval_type'>days</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,45 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Email template --> |
|||
<data noupdate="1"> |
|||
<record id="overdue_task_email_template" model="mail.template"> |
|||
<field name="name">Project Task Overdue: Send by email</field> |
|||
<field name="model_id" ref="task_overdue_email_odoo.model_project_task"/> |
|||
<field name="subject">Task Overdue Notification</field> |
|||
<field name="email_to">{{ ctx.get('user_email') }}</field> |
|||
<field name="body_html" type="html"> |
|||
<html> |
|||
Dear Employee |
|||
<t t-esc="ctx.get('user_name')"/> |
|||
<head>Overdue Task List</head> |
|||
<table border="1" style="width:100%"> |
|||
<thead style="background-color: rgb(255, 0, 149);"> |
|||
<tr> |
|||
<th align="center">Project</th> |
|||
<th align="center">Task</th> |
|||
<th align="center">Deadline Date</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="ctx.get('recipient_list')" t-as="recipient"> |
|||
<tr> |
|||
<td> |
|||
<t t-esc="recipient[0]"/> |
|||
</td> |
|||
<td> |
|||
<t t-esc="recipient[1]"/> |
|||
</td> |
|||
<td> |
|||
<t t-esc="ctx.get('task_deadline')"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
<br/> |
|||
<p>Thank you</p> |
|||
</html> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,7 @@ |
|||
## Module <task_overdue_email_odoo> |
|||
|
|||
#### 04.11.2024 |
|||
#### Version 18.0.1.0.0 |
|||
#### ADD |
|||
|
|||
- Initial Commit for Task Overdue Email Notification |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import project_task |
|||
from . import res_config_settings |
@ -0,0 +1,82 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProjectTask(models.Model): |
|||
"""This is an Odoo model for Project Tasks. It inherits from the |
|||
'project.task' model and adds a boolean field to indicate whether a task has |
|||
been completed or not.""" |
|||
_inherit = 'project.task' |
|||
|
|||
is_completed_task = fields.Boolean(string='Task Completed', |
|||
help="This field is used to indicate " |
|||
"whether or not a particular " |
|||
"task has been completed") |
|||
|
|||
def action_task_completed(self): |
|||
"""Onclicking Task Completed Button the Boolean field completed_task |
|||
will become True and make Button |
|||
Invisible""" |
|||
self.is_completed_task = True |
|||
|
|||
def action_overdue(self): |
|||
""" This is a Scheduled action function that sends an email |
|||
notification to project team members for overdue |
|||
tasks. Reads a configuration parameter to determine the |
|||
number of days after the due date that a task is |
|||
considered overdue. Searches for incomplete tasks that have |
|||
a due date less than or equal to the current |
|||
date, and groups them by user For each user with overdue tasks, |
|||
sends an email containing a list of their tasks. |
|||
""" |
|||
over_due_days = int(self.env['ir.config_parameter'].sudo().get_param( |
|||
'task_overdue_email_odoo.overdue_days')) |
|||
today = fields.datetime.today() |
|||
project_task = self.env['project.task'].search( |
|||
[('is_completed_task', '=', False), |
|||
('date_deadline', '<=', today)]) |
|||
user_tasks = {} |
|||
for task in project_task: |
|||
overdue_task_sent_mail = (today - task.date_deadline).days |
|||
if overdue_task_sent_mail == over_due_days: |
|||
for user in task.user_ids: |
|||
if user.email not in user_tasks: |
|||
user_tasks[user.email] = [] |
|||
user_tasks[user.email].append((task.project_id.name, |
|||
task.name, |
|||
task.date_deadline, |
|||
user.name)) |
|||
for user_email, tasks in user_tasks.items(): |
|||
recipient_list = [(task[0], task[1], user_email) for task in tasks] |
|||
project_name, task_name, task_deadline, user_name = tasks[0] |
|||
email_values = { |
|||
'recipient_list': recipient_list, |
|||
'user_email': user_email, |
|||
'task_deadline': task_deadline, |
|||
'user_name': user_name, |
|||
} |
|||
template_id = self.env.ref \ |
|||
('task_overdue_email_odoo.overdue_task_email_template').id |
|||
self.env['mail.template'].browse(template_id).with_context( |
|||
email_values) \ |
|||
.send_mail(self.id, force_send=True) |
@ -0,0 +1,42 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ResConfigSettings(models.TransientModel): |
|||
"""This is an Odoo model for system configuration settings related to overdue |
|||
task notifications. It inherits from the 'res.config.settings' model and adds |
|||
boolean and integer fields for configuring overdue task notifications.""" |
|||
|
|||
_inherit = "res.config.settings" |
|||
|
|||
is_notification = fields.Boolean(string="Overdue Notification", |
|||
config_parameter="task_overdue_email_odoo.is_notification", |
|||
help="The string parameter specifies " |
|||
"the label or name of the field as " |
|||
"it will appear in the user " |
|||
"interface (in this case," |
|||
" ""Overdue Notification") |
|||
overdue_days = fields.Integer(string="Overdue Days :",config_parameter="task_overdue_email_odoo.overdue_days", |
|||
help="specify how many days overdue a " |
|||
"task must be before a " |
|||
"notification is sent.") |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 9.5 KiB |
@ -0,0 +1,40 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<odoo> |
|||
<!--Inherited Form view project_task_form--> |
|||
<record id="view_task_form2" model="ir.ui.view"> |
|||
<field name="name">project.task.view.form.inherit.task.overdue.email.odoo</field> |
|||
<field name="model">project.task</field> |
|||
<field name="inherit_id" ref="project.view_task_form2"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//field[@name='user_ids']" position="after"> |
|||
<field name="is_completed_task" invisible="1"/> |
|||
</xpath> |
|||
|
|||
<xpath expr="//header" position="inside"> |
|||
<button name="action_task_completed" string="Task Completed" |
|||
type="object" class="oe_highlight" |
|||
invisible="is_completed_task != False"/> |
|||
|
|||
</xpath> |
|||
<xpath expr="//div[hasclass('oe_button_box')]" position="before"> |
|||
<widget name="web_ribbon" title="Completed" bg_color="bg-success" |
|||
invisible="is_completed_task == False"/> |
|||
</xpath> |
|||
|
|||
</field> |
|||
</record> |
|||
<!--Inherited the search filter to add 2 more fields in the tree search form--> |
|||
<record id="view_task_search_form" model="ir.ui.view"> |
|||
<field name="name">project.task.view.search.inherit.task.overdue.email.odoo</field> |
|||
<field name="model">project.task</field> |
|||
<field name="inherit_id" ref="project.view_task_search_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//filter[@name='unassigned']" position="after"> |
|||
<filter string="Completed" name="completed_task" |
|||
domain="[('is_completed_task','=',True)]"/> |
|||
<filter string="Not Completed" name="not_completed_task" |
|||
domain="[('is_completed_task','!=',True)]"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Inherited the res.config.setting to add the fields--> |
|||
<record id="res_config_settings_view_form" model="ir.ui.view"> |
|||
<field name="name">res.config.setting.view.form.inherit.task.overdue.email.odoo |
|||
</field> |
|||
<field name="model">res.config.settings</field> |
|||
<field name="inherit_id" ref="project.res_config_settings_view_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//block[@name='analytic']" |
|||
position="after"> |
|||
<block title="Task Overdue Notification" |
|||
name="project_task_overdue_notification"> |
|||
<setting id="notification" |
|||
string="Overdue Notification" |
|||
help="Overdue tasks notification sent by email"> |
|||
<field name="is_notification"/> |
|||
<span invisible="is_notification == False">Overdue |
|||
Days |
|||
</span> |
|||
<field name="overdue_days" |
|||
invisible="is_notification == False"/> |
|||
</setting> |
|||
</block> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |