Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions helpdesk_ticket_close_inactive/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==============================
Helpdesk Ticket Close Inactive
==============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0236ea793cba8c54cd654531712f276f63bd025b47de5999bfcbc9b0277a369b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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/19.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-19-0/helpdesk-19-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=19.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 the number of inactive days before a warning email is sent, or set
it to 0 to disable the warning phase entirely. When greater than 0, a
warning email template must be selected.
- Set the warning email template, or leave it hidden (by setting days to
0) to skip warning notifications.
- Set the number of inactive days after which the ticket is
automatically closed (must be greater than 0).
- Optionally set a closing email template. Leave it empty to close
tickets silently without sending a notification email.
- Set the closing stage that tickets will be moved to when auto-closed.
- Set stages to be filtered on the domain to execute the action.
- Set ticket categories to be filtered on the domain to execute the
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:%2019.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 miquel.alzanillas@nagarro.com

- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- Bhavesh Heliconia

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/19.0/helpdesk_ticket_close_inactive>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions helpdesk_ticket_close_inactive/__init__.py
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
21 changes: 21 additions & 0 deletions helpdesk_ticket_close_inactive/__manifest__.py
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": "19.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",
],
}
126 changes: 126 additions & 0 deletions helpdesk_ticket_close_inactive/data/helpdesk_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?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">
model.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="nextcall"
eval="(DateTime.now() + timedelta(minutes=1)).strftime('%Y-%m-%d %H:%M:%S')"
/>
</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>Ticket with subject "<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>
Loading
Loading