Skip to content

Commit

Permalink
[ADD][16.0] helpdesk_mgmt_portal_follower: New module
Browse files Browse the repository at this point in the history
  • Loading branch information
BernatObrador committed Oct 31, 2024
1 parent 5c54bd0 commit d210705
Show file tree
Hide file tree
Showing 17 changed files with 795 additions and 0 deletions.
118 changes: 118 additions & 0 deletions helpdesk_mgmt_portal_follower/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
===============
Portal Follower
===============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:40904a6ef0534a7fe3f5997123010eedbe054019469f715b806be6eee3d80c06
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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_portal_follower
: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_portal_follower
: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|

This module adds the posibilty to add followers to a helpdesk ticket
from the helpdesk form at the website portal.

**Table of contents**

.. contents::
:local:

Usage
=====

To make it work you just need to add the emails of the wanted followers
to the ``Emails in Copy`` input splitted by comas.

Known issues / Roadmap
======================

Known Caveats
-------------

1. **Spam Risks**:

- Allowing users to input any email address could lead to spam if
unintended recipients are included.

2. **Privacy Concerns**:

- Users may inadvertently share sensitive information by adding
followers without the consent of the email address owners.
- This feature could expose email addresses to individuals who
should not have access to that information.

3. **User Misunderstanding**:

- End-users may not fully understand the implications of adding
multiple email addresses, potentially leading to confusion or
misuse.

If you plan to use this module, it is essential to inform users about
the importance of carefully selecting followers to add. This process
will help maintain privacy and limit unnecessary notifications.

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_portal_follower%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
-------

* Advanced Programming Solutions S.L. - APSL - Nagarro
* Bernat Obrador
* Patryk Pyczko
* Miquel Pascual

Contributors
------------

- `APSL-Nagarro <https://apsl.tech>`__:

- Patryk Pyczko ppyczko@apsl.net
- Bernat Obrador bobrador@apsl.net
- Miquel Pascual mpascual@apsl.net

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions helpdesk_mgmt_portal_follower/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import controllers
16 changes: 16 additions & 0 deletions helpdesk_mgmt_portal_follower/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "Portal Follower",
"summary": "Add ticket followers from website portal",
"author": (
"Advanced Programming Solutions S.L. - APSL - Nagarro, "
"Bernat Obrador, Patryk Pyczko, Miquel Pascual, Odoo Community Association (OCA)"
),
"license": "AGPL-3",
"mantainers": ["BernatObrador", "ppyczko", "mpascuall"],
"website": "https://github.com/OCA/helpdesk",
"category": "Helpdesk",
"version": "16.0.1.0.0",
"depends": ["helpdesk_mgmt"],
"data": ["views/helpdesk_templates.xml"],
"installable": True,
}
1 change: 1 addition & 0 deletions helpdesk_mgmt_portal_follower/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
34 changes: 34 additions & 0 deletions helpdesk_mgmt_portal_follower/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import odoo.http as http
from odoo.http import request

from odoo.addons.helpdesk_mgmt.controllers.main import HelpdeskTicketController


class HelpdeskTicketController(HelpdeskTicketController):
@http.route("/submitted/ticket", type="http", auth="user", website=True, csrf=True)
def submit_ticket(self, **kw):
res = super(HelpdeskTicketController, self).submit_ticket(**kw)
ticket_id = res.location.split("/")[-1]
new_ticket = request.env["helpdesk.ticket"].browse(int(ticket_id))
if kw.get("followers"):
emails = [
email.strip()
for email in kw.get("followers").split(",")
if email.strip()
]
partner_ids = []

for email in emails:
partner = request.env["res.partner"].search([("email", "=", email)])
if not partner:
reg = {
"name": email,
"email": email,
"type": "contact",
}
partner = request.env["res.partner"].sudo().create(reg)

partner_ids.append(partner.id)

new_ticket.sudo().message_subscribe(partner_ids=partner_ids)
return res
26 changes: 26 additions & 0 deletions helpdesk_mgmt_portal_follower/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * helpdesk_mgmt_portal_follower
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-31 11:46+0000\n"
"PO-Revision-Date: 2024-10-31 11:46+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: helpdesk_mgmt_portal_follower
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_portal_follower.helpdesk_portal_add_followers
msgid "Emails in Copy"
msgstr "Correos en Copia"

#. module: helpdesk_mgmt_portal_follower
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_portal_follower.helpdesk_portal_add_followers
msgid "example@example.com, ..."
msgstr ""
4 changes: 4 additions & 0 deletions helpdesk_mgmt_portal_follower/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [APSL-Nagarro](<https://apsl.tech>):
- Patryk Pyczko <ppyczko@apsl.net>
- Bernat Obrador <bobrador@apsl.net>
- Miquel Pascual <mpascual@apsl.net>
1 change: 1 addition & 0 deletions helpdesk_mgmt_portal_follower/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module adds the posibilty to add followers to a helpdesk ticket from the helpdesk form at the website portal.
13 changes: 13 additions & 0 deletions helpdesk_mgmt_portal_follower/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Known Caveats

1. **Spam Risks**:
- Allowing users to input any email address could lead to spam if unintended recipients are included.

2. **Privacy Concerns**:
- Users may inadvertently share sensitive information by adding followers without the consent of the email address owners.
- This feature could expose email addresses to individuals who should not have access to that information.

3. **User Misunderstanding**:
- End-users may not fully understand the implications of adding multiple email addresses, potentially leading to confusion or misuse.

If you plan to use this module, it is essential to inform users about the importance of carefully selecting followers to add. This process will help maintain privacy and limit unnecessary notifications.
1 change: 1 addition & 0 deletions helpdesk_mgmt_portal_follower/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To make it work you just need to add the emails of the wanted followers to the `Emails in Copy` input splitted by comas.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d210705

Please sign in to comment.