Skip to content

Commit

Permalink
Merge branch 'OCA:16.0' into 16.0-t3822-helpdesk_mgmt_activity-add_mo…
Browse files Browse the repository at this point in the history
…dule
  • Loading branch information
Bearnard21 authored Dec 10, 2024
2 parents faad8f5 + f371905 commit b7ba83c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ addon | version | maintainers | summary
[helpdesk_mgmt](helpdesk_mgmt/) | 16.0.2.7.0 | | Helpdesk
[helpdesk_mgmt_portal_follower](helpdesk_mgmt_portal_follower/) | 16.0.1.0.0 | | Add ticket followers from website portal
[helpdesk_mgmt_project](helpdesk_mgmt_project/) | 16.0.2.3.1 | | Add the option to select project in the tickets.
[helpdesk_mgmt_rating](helpdesk_mgmt_rating/) | 16.0.1.0.0 | | This module allows customer to rate the assistance received on a ticket.
[helpdesk_mgmt_rating](helpdesk_mgmt_rating/) | 16.0.1.0.1 | | This module allows customer to rate the assistance received on a ticket.
[helpdesk_mgmt_timesheet](helpdesk_mgmt_timesheet/) | 16.0.1.7.1 | | Add HR Timesheet to the tickets for Helpdesk Management.
[helpdesk_motive](helpdesk_motive/) | 16.0.1.0.0 | [![nelsonramirezs](https://github.com/nelsonramirezs.png?size=30px)](https://github.com/nelsonramirezs) [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) | Keep the motive
[helpdesk_product](helpdesk_product/) | 16.0.1.0.1 | | Add the option to select product in the tickets.
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt_rating/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Helpdesk Management Rating
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f8976a3fbf7845e3e2c6756782481e841b327654e3a45076e41c7862751b45d2
!! source digest: sha256:3c8d25a4f4c9c93fdf9ac67b23b6868fe39b06ae3aae53c68df4d3136bd86f29
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion helpdesk_mgmt_rating/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This module allows customer to rate the assistance received
on a ticket.
""",
"version": "16.0.1.0.0",
"version": "16.0.1.0.1",
"license": "AGPL-3",
"author": "Domatix, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/helpdesk",
Expand Down
14 changes: 8 additions & 6 deletions helpdesk_mgmt_rating/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Helpdesk Management Rating</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f8976a3fbf7845e3e2c6756782481e841b327654e3a45076e41c7862751b45d2
!! source digest: sha256:3c8d25a4f4c9c93fdf9ac67b23b6868fe39b06ae3aae53c68df4d3136bd86f29
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/helpdesk/tree/16.0/helpdesk_mgmt_rating"><img alt="OCA/helpdesk" src="https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/helpdesk-16-0/helpdesk-16-0-helpdesk_mgmt_rating"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds the possibility to rate the assistance received through helpdesk
Expand Down Expand Up @@ -453,7 +453,9 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
Expand Down
29 changes: 26 additions & 3 deletions helpdesk_mgmt_rating/tests/test_helpdesk_portal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright 2024 Tecnativa - Carolina Fernandez
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import http

from odoo.addons.base.tests.common import HttpCaseWithUserPortal


Expand Down Expand Up @@ -27,22 +29,43 @@ def test_rating_satisfied_ticket(self):
"""Rate satisfied ticket from the portal."""
self.authenticate("portal", "portal")
portal_access_token = self.ticket._rating_get_access_token()
resp = self.url_open(f"/rate/{portal_access_token}/5")
resp = self.url_open(
f"/rate/{portal_access_token}/submit_feedback",
data={
"rate": 5,
"csrf_token": http.Request.csrf_token(self),
"feedback": "good",
},
)
self.assertEqual(resp.status_code, 200)
self.assertEqual(self.ticket.positive_rate_percentage, 100)

def test_rating_not_satisfied_ticket(self):
"""Rate not satisfied ticket from the portal."""
self.authenticate("portal", "portal")
portal_access_token = self.ticket._rating_get_access_token()
resp = self.url_open(f"/rate/{portal_access_token}/3")
resp = self.url_open(
f"/rate/{portal_access_token}/submit_feedback",
data={
"rate": 3,
"csrf_token": http.Request.csrf_token(self),
"feedback": "good",
},
)
self.assertEqual(resp.status_code, 200)
self.assertEqual(self.ticket.positive_rate_percentage, 0)

def test_rating_dissatisfied_ticket(self):
"""Rate highly dissatisfied ticket from the portal."""
self.authenticate("portal", "portal")
portal_access_token = self.ticket._rating_get_access_token()
resp = self.url_open(f"/rate/{portal_access_token}/1")
resp = self.url_open(
f"/rate/{portal_access_token}/submit_feedback",
data={
"rate": 1,
"csrf_token": http.Request.csrf_token(self),
"feedback": "bad job",
},
)
self.assertEqual(resp.status_code, 200)
self.assertEqual(self.ticket.positive_rate_percentage, 0)

0 comments on commit b7ba83c

Please sign in to comment.