-
-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] helpdesk_mgmt_template: add module
Add pre-configured ticket description templates based on category This commit introduces the following enhancements: - Adds the ability to pre-configure a helpdesk ticket's description template based on the selected category. - Users can now define ticket description templates within Helpdesk-->Configuration-->Categories. - Categories can be assigned to specific teams, allowing pre-defined templates to be triggered during ticket creation. Task: 3829
- Loading branch information
1 parent
41e07ff
commit aefb026
Showing
19 changed files
with
856 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,106 @@ | ||
============================ | ||
Helpdesk Management Template | ||
============================ | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:d785e09cb190bfcdbafe4d42b6fd30f3bf16f06d6febdb41038241735e093008 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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-OCA%2Fhelpdesk-lightgray.png?logo=github | ||
:target: https://github.com/OCA/helpdesk/tree/16.0/helpdesk_mgmt_template | ||
: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_mgmt_template | ||
: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| | ||
|
||
The module adds the following features: | ||
|
||
- Pre-configure ticket description template based on it's category | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
**To Configure Ticket's Description Template** | ||
- Go to Helpdesk -> Configuration -> Categories. | ||
- Create a new Category or select an existing Category. | ||
- Set the *Template* field with pre-defined the ticket's description that will be triggered based on the category selected. | ||
|
||
**To configure available Categories for Teams** | ||
- Go to Helpdesk -> Configuration -> Categories. | ||
- Create a new Team or select an existing Team. | ||
- Select categories which are available for the Team. | ||
|
||
Usage | ||
===== | ||
|
||
**Go to Helpdesk module:** | ||
|
||
- Select a Team | ||
- Open a Ticket | ||
- Create a new Ticket | ||
- Select Category | ||
- Add a description or modify category description template (if configured) | ||
|
||
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_mgmt_template%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 | ||
~~~~~~~ | ||
|
||
* Cetmix OÜ | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Cetmix OÜ <https://cetmix.com>`_: | ||
|
||
* Ivan Sokolov | ||
* Mikhail Lapin | ||
* Dessan Hemrayev | ||
|
||
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. | ||
|
||
This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/16.0/helpdesk_mgmt_template>`_ 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,4 @@ | ||
# Copyright (C) 2024 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://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,18 @@ | ||
# Copyright (C) 2024 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Helpdesk Management Template", | ||
"summary": "Create Helpdesk Ticket Template", | ||
"version": "16.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "Cetmix OÜ, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/helpdesk", | ||
"depends": ["helpdesk_mgmt"], | ||
"data": [ | ||
"views/helpdesk_ticket_views.xml", | ||
"views/helpdesk_ticket_category_views.xml", | ||
"views/helpdesk_ticket_team_views.xml", | ||
], | ||
"application": False, | ||
} |
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,5 @@ | ||
# Copyright (C) 2024 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import helpdesk_ticket_category | ||
from . import helpdesk_ticket |
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,41 @@ | ||
# Copyright (C) 2024 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class HelpdeskTicket(models.Model): | ||
_inherit = "helpdesk.ticket" | ||
|
||
description = fields.Html( | ||
store=True, | ||
compute="_compute_description", | ||
readonly=False, | ||
) | ||
helpdesk_ticket_category_ids = fields.Many2many( | ||
"helpdesk.ticket.category", compute="_compute_helpdesk_ticket_category" | ||
) | ||
|
||
@api.depends("team_id") | ||
def _compute_helpdesk_ticket_category(self): | ||
for rec in self: | ||
rec.helpdesk_ticket_category_ids = rec.team_id.category_ids | ||
|
||
@api.depends("category_id") | ||
def _compute_description(self): | ||
for record in self: | ||
if record.category_id.template_description: | ||
record.description = record.category_id.template_description | ||
elif record.description: | ||
record.description = record.description | ||
else: | ||
record.description = "<p></p>" | ||
|
||
def copy(self, default=None): | ||
self.ensure_one() | ||
if default is None: | ||
default = {} | ||
if "description" not in default: | ||
default["description"] = "<p></p>" | ||
return super().copy(default) |
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,10 @@ | ||
# Copyright (C) 2024 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class HelpdeskCategory(models.Model): | ||
_inherit = "helpdesk.ticket.category" | ||
|
||
template_description = fields.Html(sanitize_style=True) |
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,9 @@ | ||
**To Configure Ticket's Description Template** | ||
- Go to Helpdesk -> Configuration -> Categories. | ||
- Create a new Category or select an existing Category. | ||
- Set the *Template* field with pre-defined the ticket's description that will be triggered based on the category selected. | ||
|
||
**To configure available Categories for Teams** | ||
- Go to Helpdesk -> Configuration -> Categories. | ||
- Create a new Team or select an existing Team. | ||
- Select categories which are available for the Team. |
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,5 @@ | ||
* `Cetmix OÜ <https://cetmix.com>`_: | ||
|
||
* Ivan Sokolov | ||
* Mikhail Lapin | ||
* Dessan Hemrayev |
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 @@ | ||
The module adds the following features: | ||
|
||
- Pre-configure ticket description template based on it's category |
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,7 @@ | ||
**Go to Helpdesk module:** | ||
|
||
- Select a Team | ||
- Open a Ticket | ||
- Create a new Ticket | ||
- Select Category | ||
- Add a description or modify category description template (if configured) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.