diff --git a/helpdesk_ticket_message_contact_default_unchecked/README.rst b/helpdesk_ticket_message_contact_default_unchecked/README.rst new file mode 100644 index 0000000000..3dc01ee8f5 --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/README.rst @@ -0,0 +1,78 @@ +================================================= +Helpdesk Ticket Message Contact Default Unchecked +================================================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:1abc80f13f87ef993f4354f36626df2ea139acc3fa1fc989d16da122b49e5d0d + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/18.0/helpdesk_ticket_message_contact_default_unchecked + :alt: OCA/helpdesk +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/helpdesk-18-0/helpdesk-18-0-helpdesk_ticket_message_contact_default_unchecked + :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=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +By default, when you create a ticket with a selected contact or send a +message, the “Add as follower and recipient” checkbox is checked. With +this addon, the checkbox is unchecked by default. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +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 +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Solvos + +Contributors +------------ + +- Iria Alonso + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/helpdesk_ticket_message_contact_default_unchecked/__init__.py b/helpdesk_ticket_message_contact_default_unchecked/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/helpdesk_ticket_message_contact_default_unchecked/__manifest__.py b/helpdesk_ticket_message_contact_default_unchecked/__manifest__.py new file mode 100644 index 0000000000..98ab8123a3 --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright 2026 Solvos Consultoria Informatica +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Helpdesk Ticket Message Contact Default Unchecked", + "summary": """ + By default, when you create a ticket with a selected + contact or send a message, the “Add as follower and recipient” + checkbox is checked. + With this addon, the checkbox is unchecked by default. + """, + "version": "18.0.1.0.0", + "category": "Helpdesk", + "website": "https://github.com/OCA/helpdesk", + "author": "Solvos, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": ["helpdesk_mgmt"], + "assets": { + "web.assets_backend": [ + "helpdesk_ticket_message_contact_default_unchecked/static/src/js/suggested_recipients_list.esm.js" + ], + "web.assets_tests": [ + "helpdesk_ticket_message_contact_default_unchecked/static/tests/tours/*", + ], + }, +} diff --git a/helpdesk_ticket_message_contact_default_unchecked/pyproject.toml b/helpdesk_ticket_message_contact_default_unchecked/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/helpdesk_ticket_message_contact_default_unchecked/readme/CONTRIBUTORS.md b/helpdesk_ticket_message_contact_default_unchecked/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..a546725150 --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Iria Alonso \ diff --git a/helpdesk_ticket_message_contact_default_unchecked/readme/DESCRIPTION.md b/helpdesk_ticket_message_contact_default_unchecked/readme/DESCRIPTION.md new file mode 100644 index 0000000000..bd019df34e --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +By default, when you create a ticket with a selected +contact or send a message, the “Add as follower and recipient” checkbox is checked. +With this addon, the checkbox is unchecked by default. diff --git a/helpdesk_ticket_message_contact_default_unchecked/static/description/icon.png b/helpdesk_ticket_message_contact_default_unchecked/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/helpdesk_ticket_message_contact_default_unchecked/static/description/icon.png differ diff --git a/helpdesk_ticket_message_contact_default_unchecked/static/description/index.html b/helpdesk_ticket_message_contact_default_unchecked/static/description/index.html new file mode 100644 index 0000000000..9ba043dc6b --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/static/description/index.html @@ -0,0 +1,425 @@ + + + + + +Helpdesk Ticket Message Contact Default Unchecked + + + +
+

Helpdesk Ticket Message Contact Default Unchecked

+ + +

Beta License: AGPL-3 OCA/helpdesk Translate me on Weblate Try me on Runboat

+

By default, when you create a ticket with a selected contact or send a +message, the “Add as follower and recipient” checkbox is checked. With +this addon, the checkbox is unchecked by default.

+

Table of contents

+ +
+

Bug Tracker

+

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 +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Solvos
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/helpdesk_ticket_message_contact_default_unchecked/static/src/js/suggested_recipients_list.esm.js b/helpdesk_ticket_message_contact_default_unchecked/static/src/js/suggested_recipients_list.esm.js new file mode 100644 index 0000000000..bc683c5890 --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/static/src/js/suggested_recipients_list.esm.js @@ -0,0 +1,17 @@ +/* Copyright 2026 Solvos - Iria Alonso + License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). +*/ +import {SuggestedRecipientsList} from "@mail/core/web/suggested_recipient_list"; +import {patch} from "@web/core/utils/patch"; + +patch(SuggestedRecipientsList.prototype, { + get suggestedRecipients() { + const recipients = super.suggestedRecipients; + if (this.props.thread?.model === "helpdesk.ticket") { + for (const recipient of recipients) { + recipient.checked = false; + } + } + return recipients; + }, +}); diff --git a/helpdesk_ticket_message_contact_default_unchecked/static/tests/tours/TicketContactUncheck.tour.esm.js b/helpdesk_ticket_message_contact_default_unchecked/static/tests/tours/TicketContactUncheck.tour.esm.js new file mode 100644 index 0000000000..09cf721fd7 --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/static/tests/tours/TicketContactUncheck.tour.esm.js @@ -0,0 +1,26 @@ +/* Copyright 2026 Solvos - Iria Alonso + License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). +*/ +import {registry} from "@web/core/registry"; + +registry.category("web_tour.tours").add("helpdesk_suggested_recipient_tour", { + test: true, + url: "/odoo/my-helpdesk-tickets?view_type=list", + steps: () => [ + { + content: "Select the test ticket to open the form view", + trigger: + ".o_list_table .o_data_row:contains('Test Contact Uncheck') .o_data_cell", + run: "click", + }, + { + content: "Click on Send message button to open the composer", + trigger: "button.o-mail-Chatter-sendMessage", + run: "click", + }, + { + content: "Check the suggested recipient is unchecked by default", + trigger: ".form-check-input:not(:checked)", + }, + ], +}); diff --git a/helpdesk_ticket_message_contact_default_unchecked/tests/__init__.py b/helpdesk_ticket_message_contact_default_unchecked/tests/__init__.py new file mode 100644 index 0000000000..ab211c0007 --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/tests/__init__.py @@ -0,0 +1 @@ +from . import test_frontend diff --git a/helpdesk_ticket_message_contact_default_unchecked/tests/test_frontend.py b/helpdesk_ticket_message_contact_default_unchecked/tests/test_frontend.py new file mode 100644 index 0000000000..f9eaf5f515 --- /dev/null +++ b/helpdesk_ticket_message_contact_default_unchecked/tests/test_frontend.py @@ -0,0 +1,37 @@ +# © 2026 Solvos Consultoría Informática () +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from odoo.tests import HttpCase, tagged + + +@tagged("post_install", "-at_install") +class TestSuggestedRecipientsTour(HttpCase): + def test_helpdesk_recipient_unchecked(self): + admin_user = self.env.ref("base.user_admin") + company = admin_user.company_id + + partner = ( + self.env["res.partner"] + .with_company(company) + .create( + { + "name": "Test Contact Uncheck Partner", + "email": "test.contact@example.com", + } + ) + ) + + self.env["helpdesk.ticket"].with_company(company).create( + { + "name": "Test Contact Uncheck", + "partner_id": partner.id, + "user_id": admin_user.id, + "description": "Description Test", + } + ) + + self.start_tour( + "/odoo/my-helpdesk-tickets?view_type=list", + "helpdesk_suggested_recipient_tour", + login="admin", + )