-
-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] helpdesk_ticket_close_inactive
- Loading branch information
1 parent
41e07ff
commit 47c8479
Showing
19 changed files
with
1,366 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
============================== | ||
Helpdesk Ticket Close Inactive | ||
============================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:f1bc78e3d9430b4bab000d782e9149fa81d1cf2da193ca82f01042b907f994c9 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Alpha | ||
.. |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-OCA%2Fhelpdesk-lightgray.png?logo=github | ||
:target: https://github.com/OCA/helpdesk/tree/16.0/helpdesk_ticket_close_inactive | ||
:alt: OCA/helpdesk | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/helpdesk-16-0/helpdesk-16-0-helpdesk_ticket_close_inactive | ||
: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/helpdesk&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Adds an option to configure a cron job that automatically closes | ||
inactive helpdesk tickets after a specified number of days, set in the | ||
helpdesk team settings. Sends notification emails to the customer | ||
(partner) and assigned team members, providing a warning after an | ||
initial period of inactivity and a final closure notification when the | ||
maximum inactivity period is reached. | ||
|
||
.. IMPORTANT:: | ||
This is an alpha version, the data model and design can change at any time without warning. | ||
Only for development or testing purpose, do not use in production. | ||
`More details on development status <https://odoo-community.org/page/development-status>`_ | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
- Go to Helpdesk > Settings > Teams. | ||
- Select a team. | ||
- Enable 'Automatic closure of inactive tickets' option. | ||
- Set number of days to be reached before send a warning notification to | ||
the partner. | ||
- Set warning email template or use the one provided by default. | ||
- Set number of days to be reached before closing ticket. | ||
- Set closing email template or use the one provided by default. | ||
- Set stages to be filtered on the domain to execute action. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/helpdesk/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/helpdesk/issues/new?body=module:%20helpdesk_ticket_close_inactive%0Aversion:%2016.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 | ||
------- | ||
|
||
* APSL-Nagarro | ||
|
||
Contributors | ||
------------ | ||
|
||
- ``APSL-Nagarro <https://apsl.tech>``\ \_: | ||
|
||
- Miquel Alzanillas [email protected] | ||
|
||
Maintainers | ||
----------- | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
.. |maintainer-miquelalzanillas| image:: https://github.com/miquelalzanillas.png?size=40px | ||
:target: https://github.com/miquelalzanillas | ||
:alt: miquelalzanillas | ||
|
||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-miquelalzanillas| | ||
|
||
This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/16.0/helpdesk_ticket_close_inactive>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright <YEAR(S)> <AUTHOR(S)> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Helpdesk Ticket Close Inactive", | ||
"version": "16.0.1.0.0", | ||
"development_status": "Alpha", | ||
"category": "Helpdesk", | ||
"website": "https://github.com/OCA/helpdesk", | ||
"author": "APSL-Nagarro, Odoo Community Association (OCA)", | ||
"maintainers": ["miquelalzanillas"], | ||
"license": "AGPL-3", | ||
"application": False, | ||
"installable": True, | ||
"depends": [ | ||
"helpdesk_mgmt", | ||
], | ||
"data": [ | ||
"views/helpdesk_ticket_team.xml", | ||
"data/helpdesk_data.xml", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo noupdate="1"> | ||
<record id="ir_cron_close_inactive_tickets" model="ir.cron"> | ||
<field name="name">Close Inactive Tickets</field> | ||
<field name="active" eval="True" /> | ||
<field name="model_id" ref="helpdesk_mgmt.model_helpdesk_ticket_team" /> | ||
<field name="state">code</field> | ||
<field name="code"> | ||
teams = model.search([('close_inactive_tickets', '=', True)]) | ||
teams.close_team_inactive_tickets() | ||
</field> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field | ||
name="nextcall" | ||
eval="(DateTime.now() + timedelta(minutes=1)).strftime('%Y-%m-%d %H:%M:%S')" | ||
/> | ||
<field name="doall">0</field> | ||
</record> | ||
<record id="warning_inactive_ticket_template" model="mail.template"> | ||
<field name="name">Helpdesk Inactivity Warning Ticket Notification Email</field> | ||
<field name="model_id" ref="helpdesk_mgmt.model_helpdesk_ticket" /> | ||
<field name="email_from">{{object.company_id.partner_id.email}}</field> | ||
<field | ||
name="email_cc" | ||
>{{not object.partner_id and object.partner_email or ''}},</field> | ||
<field name="subject">The ticket {{object.number}} will be closed.</field> | ||
<field name="partner_to">{{object.partner_id.id}}</field> | ||
<field name="auto_delete" eval="False" /> | ||
<field name="lang">{{object.partner_id.lang}}</field> | ||
<field name="body_html" type="html"> | ||
<table | ||
border="0" | ||
width="100%" | ||
cellpadding="0" | ||
bgcolor="#ededed" | ||
style="padding: 20px; background-color: #ededed; border-collapse:separate;" | ||
> | ||
<tbody> | ||
<!-- HEADER --> | ||
<tr> | ||
<td align="center" style="min-width: 590px;"> | ||
<table | ||
width="590" | ||
border="0" | ||
cellpadding="0" | ||
bgcolor="#875A7B" | ||
style="min-width: 590px; background-color: rgb(135,90,123); padding: 20px; border-collapse:separate;" | ||
> | ||
<tr> | ||
<td valign="middle" align="right"> | ||
<img | ||
t-att-src="'/logo.png?company=%s' % object.company_id.id" | ||
style="padding: 0px; margin: 0px; height: auto; width: 80px;" | ||
t-att-alt="'%s' % object.company_id.name" | ||
/> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
<!-- CONTENT --> | ||
<tr> | ||
<td align="center" style="min-width: 590px;"> | ||
<table | ||
width="590" | ||
border="0" | ||
cellpadding="0" | ||
bgcolor="#ffffff" | ||
style="min-width: 590px; background-color: rgb(255, 255, 255); padding: 20px; border-collapse:separate;" | ||
> | ||
<tbody> | ||
<td | ||
valign="top" | ||
style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;" | ||
> | ||
<p>Hello <t t-out="object.user_id.name" />,</p> | ||
<p>This ticket "<t | ||
t-out="object.display_name" | ||
/>" will be closed in <t | ||
t-out="ctx.get('remaining_days')" | ||
/> days if it is not updated .</p> | ||
</td> | ||
</tbody> | ||
</table> | ||
</td> | ||
</tr> | ||
<!-- FOOTER --> | ||
<tr> | ||
<td align="center" style="min-width: 590px;"> | ||
<table | ||
width="590" | ||
border="0" | ||
cellpadding="0" | ||
bgcolor="#875A7B" | ||
style="min-width: 590px; background-color: rgb(135,90,123); padding: 20px; border-collapse:separate;" | ||
> | ||
<tr> | ||
<td | ||
valign="middle" | ||
align="left" | ||
style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;" | ||
> | ||
<t t-out="object.company_id.phone" /> | ||
</td> | ||
<td | ||
valign="middle" | ||
align="left" | ||
style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;" | ||
> | ||
<t t-out="object.company_id.email" /> | ||
</td> | ||
<td | ||
valign="middle" | ||
align="left" | ||
style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;" | ||
> | ||
<t t-out="object.company_id.website" /> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</field> | ||
</record> | ||
</odoo> |
Oops, something went wrong.