Maintainers
+Maintainers
This module is maintained by the OCA.
@@ -618,6 +624,5 @@ diff --git a/helpdesk_mgmt/README.rst b/helpdesk_mgmt/README.rst index 3e6926d1e9..298684e031 100644 --- a/helpdesk_mgmt/README.rst +++ b/helpdesk_mgmt/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - =================== Helpdesk Management =================== @@ -17,7 +13,7 @@ Helpdesk Management .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status :alt: Production/Stable -.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png +.. |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 @@ -129,6 +125,16 @@ permissions set in Helpdesk. not assigned to any team nor user. 3. *User*: User is able to see all the tickets. +Customer notifications +---------------------- + +If you want portal users to receive an email when a ticket is created: + +1. Enable debug mode +2. Open the "Ticket Created" subtype in Settings > Technical > Discuss > + Subtypes +3. Enable the ``Default`` flag + .. |image1| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Channels.PNG .. |image2| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Categories.PNG .. |image3| image:: https://raw.githubusercontent.com/OCA/helpdesk/18.0/helpdesk_mgmt/static/description/Stages.PNG diff --git a/helpdesk_mgmt/controllers/main.py b/helpdesk_mgmt/controllers/main.py index 0a01b46f68..f7711a6d80 100644 --- a/helpdesk_mgmt/controllers/main.py +++ b/helpdesk_mgmt/controllers/main.py @@ -102,15 +102,17 @@ def _prepare_submit_ticket_vals(self, **kw): ) ) vals["team_id"] = team.id - # Need to set stage_id so that the _track_template() method is called - # and the mail is sent automatically if applicable - vals["stage_id"] = team._get_applicable_stages()[:1].id return vals @http.route("/submitted/ticket", type="http", auth="user", website=True, csrf=True) def submit_ticket(self, **kw): vals = self._prepare_submit_ticket_vals(**kw) - new_ticket = request.env["helpdesk.ticket"].sudo().create(vals) + new_ticket = ( + request.env["helpdesk.ticket"] + .sudo() + .with_context(mail_notify_author=True) + .create(vals) + ) new_ticket.message_subscribe(partner_ids=request.env.user.partner_id.ids) if kw.get("attachment"): for c_file in request.httprequest.files.getlist("attachment"): diff --git a/helpdesk_mgmt/models/helpdesk_ticket.py b/helpdesk_mgmt/models/helpdesk_ticket.py index 4c6f85a904..9b6c1abbee 100644 --- a/helpdesk_mgmt/models/helpdesk_ticket.py +++ b/helpdesk_mgmt/models/helpdesk_ticket.py @@ -315,8 +315,6 @@ def _track_template(self, tracking): res["stage_id"] = ( ticket.stage_id.mail_template_id, { - # Need to set mass_mail so that the email will always be sent - "composition_mode": "mass_mail", "auto_delete_keep_log": False, "subtype_id": self.env["ir.model.data"]._xmlid_to_res_id( "mail.mt_note" diff --git a/helpdesk_mgmt/readme/CONFIGURE.md b/helpdesk_mgmt/readme/CONFIGURE.md index 5a1b50415c..98742443b7 100644 --- a/helpdesk_mgmt/readme/CONFIGURE.md +++ b/helpdesk_mgmt/readme/CONFIGURE.md @@ -79,3 +79,11 @@ permissions set in Helpdesk. assigned to the teams to which he/she belongs or the tickets that are not assigned to any team nor user. 3. *User*: User is able to see all the tickets. + +## Customer notifications + +If you want portal users to receive an email when a ticket is created: + +1. Enable debug mode +2. Open the "Ticket Created" subtype in Settings > Technical > Discuss > Subtypes +3. Enable the `Default` flag diff --git a/helpdesk_mgmt/static/description/index.html b/helpdesk_mgmt/static/description/index.html index ee8b8b9254..8940479d6c 100644 --- a/helpdesk_mgmt/static/description/index.html +++ b/helpdesk_mgmt/static/description/index.html @@ -3,7 +3,7 @@
-This module adds Helpdesk functionality in Odoo.
Table of contents
To configure this module, you need to:
There are restrictions to read tickets according to the user’s permissions set in Helpdesk.
If you want portal users to receive an email when a ticket is created:
+
Bugs are tracked on GitHub 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 @@ -531,9 +537,9 @@
Do not contact contributors directly about support or help with technical issues.