Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] helpdesk_portal_priority: New module helpdesk_portal_prio… #696

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from
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
93 changes: 93 additions & 0 deletions helpdesk_portal_priority/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
========================
Helpdesk Portal Priority
========================

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

.. |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_portal_priority
: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_portal_priority
: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 allows priority to be assigned when creating portal tickets.

**Table of contents**

.. contents::
:local:

Usage
=====

When creating tickets in the portal, you can select the priority of the
ticket.

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

* Lansana Barry Sow
* APSL-Nagarro

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

[APSL-Nagarro](https://apsl.tech):

- Lansana Barry Sow <[email protected]>

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-lbarry-apsl| image:: https://github.com/lbarry-apsl.png?size=40px
:target: https://github.com/lbarry-apsl
:alt: lbarry-apsl

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-lbarry-apsl|

This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/16.0/helpdesk_portal_priority>`_ 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_portal_priority/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import controllers
19 changes: 19 additions & 0 deletions helpdesk_portal_priority/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2025 Lansana Barry Sow(APSL-Nagarro)<[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Helpdesk Portal Priority",
"version": "16.0.1.0.0",
"category": "Helpdesk",
"website": "https://github.com/OCA/helpdesk",
"author": "Lansana Barry Sow, APSL-Nagarro, Odoo Community Association (OCA)",
"maintainers": ["lbarry-apsl"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"helpdesk_mgmt",
],
"data": [
"views/helpdesk_ticket_templates.xml",
],
}
1 change: 1 addition & 0 deletions helpdesk_portal_priority/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
26 changes: 26 additions & 0 deletions helpdesk_portal_priority/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import logging

import odoo.http as http

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

_logger = logging.getLogger(__name__)


class HelpdeskPriorityController(HelpdeskTicketController):
@http.route("/new/ticket", type="http", auth="user", website=True)
def create_new_ticket(self, **kw):
res = super().create_new_ticket(**kw)
priorities = (

Check warning on line 14 in helpdesk_portal_priority/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

helpdesk_portal_priority/controllers/main.py#L13-L14

Added lines #L13 - L14 were not covered by tests
http.request.env["helpdesk.ticket"]
._fields["priority"]
._description_selection(http.request.env)
)
res.qcontext["priorities"] = priorities
return res

Check warning on line 20 in helpdesk_portal_priority/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

helpdesk_portal_priority/controllers/main.py#L19-L20

Added lines #L19 - L20 were not covered by tests

def _prepare_submit_ticket_vals(self, **kw):
vals = super()._prepare_submit_ticket_vals(**kw)
vals["priority"] = kw.get("priority")

return vals
2 changes: 2 additions & 0 deletions helpdesk_portal_priority/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\[APSL-Nagarro\](<https://apsl.tech>):
- Lansana Barry Sow \<<[email protected]>\>
1 change: 1 addition & 0 deletions helpdesk_portal_priority/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows priority to be assigned when creating portal tickets.
1 change: 1 addition & 0 deletions helpdesk_portal_priority/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When creating tickets in the portal, you can select the priority of the ticket.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions helpdesk_portal_priority/static/description/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading