From 090c8993bb6f112fc20a33b2ea96a06f7a0e4e15 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 10 Dec 2024 08:23:36 +0000 Subject: [PATCH 1/2] [BOT] post-merge updates --- README.md | 2 +- helpdesk_mgmt_rating/README.rst | 2 +- helpdesk_mgmt_rating/__manifest__.py | 2 +- helpdesk_mgmt_rating/static/description/index.html | 14 ++++++++------ 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 90b2e2602d..1dbaa27eb2 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/helpdesk_mgmt_rating/README.rst b/helpdesk_mgmt_rating/README.rst index 09913ac7dd..724bbce5ff 100644 --- a/helpdesk_mgmt_rating/README.rst +++ b/helpdesk_mgmt_rating/README.rst @@ -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 diff --git a/helpdesk_mgmt_rating/__manifest__.py b/helpdesk_mgmt_rating/__manifest__.py index 008adc1f38..3076191187 100644 --- a/helpdesk_mgmt_rating/__manifest__.py +++ b/helpdesk_mgmt_rating/__manifest__.py @@ -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", diff --git a/helpdesk_mgmt_rating/static/description/index.html b/helpdesk_mgmt_rating/static/description/index.html index fc3d9d2741..94bdfbb06a 100644 --- a/helpdesk_mgmt_rating/static/description/index.html +++ b/helpdesk_mgmt_rating/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -: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. @@ -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 } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -367,7 +367,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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module adds the possibility to rate the assistance received through helpdesk @@ -453,7 +453,9 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +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.

From 3a84aa24457e5ef774aabe8a1c2171f685ddf46c Mon Sep 17 00:00:00 2001 From: Miquel Alzanillas Date: Mon, 23 Dec 2024 12:31:45 +0100 Subject: [PATCH 2/2] [FIX] Send warning notification only once --- .../models/helpdesk_ticket_team.py | 8 +++++--- .../tests/test_ticket_autoclose.py | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/helpdesk_ticket_close_inactive/models/helpdesk_ticket_team.py b/helpdesk_ticket_close_inactive/models/helpdesk_ticket_team.py index bda2b1f22a..78d914211c 100644 --- a/helpdesk_ticket_close_inactive/models/helpdesk_ticket_team.py +++ b/helpdesk_ticket_close_inactive/models/helpdesk_ticket_team.py @@ -1,6 +1,6 @@ # Copyright 2024 APSL-Nagarro - Miquel Alzanillas import logging -from datetime import datetime, timedelta +from datetime import datetime, time, timedelta from odoo import fields, models @@ -83,6 +83,8 @@ def close_team_inactive_tickets(self): warning_limit = datetime.today() - timedelta( days=team_id.inactive_tickets_day_limit_warning ) + warning_limit_day_first_hour = datetime.combine(warning_limit, time.min) + warning_limit_day_last_hour = datetime.combine(warning_limit, time.max) closing_limit = datetime.today() - timedelta( days=team_id.inactive_tickets_day_limit_closing ) @@ -96,8 +98,8 @@ def close_team_inactive_tickets(self): ("team_id", "=", team_id.id), ("stage_id", "in", ticket_stage_ids), ("category_id", "in", ticket_category_ids), - ("last_stage_update", "<=", warning_limit), - ("last_stage_update", ">", closing_limit), + ("last_stage_update", ">=", warning_limit_day_first_hour), + ("last_stage_update", "<=", warning_limit_day_last_hour), ] ) warning_email_ids = [] diff --git a/helpdesk_ticket_close_inactive/tests/test_ticket_autoclose.py b/helpdesk_ticket_close_inactive/tests/test_ticket_autoclose.py index 03e8287eb4..9d38801466 100644 --- a/helpdesk_ticket_close_inactive/tests/test_ticket_autoclose.py +++ b/helpdesk_ticket_close_inactive/tests/test_ticket_autoclose.py @@ -38,13 +38,13 @@ def setUp(self): "stage_id": self.stage_warning.id, "category_id": self.type_warning.id, "description": "Please help me", - "last_stage_update": datetime.today() - timedelta(days=8), + "last_stage_update": datetime.today() - timedelta(days=7), } ) def test_warning_email_sent(self): """Test that a warning email is sent after the warning day limit is reached.""" - self.ticket.write({"last_stage_update": datetime.today() - timedelta(days=8)}) + self.ticket.write({"last_stage_update": datetime.today() - timedelta(days=7)}) result = self.team.close_team_inactive_tickets() sent_mails = self.env["mail.mail"].search( [("id", "in", result["warning_email_ids"])] @@ -72,7 +72,7 @@ def test_closing_email_sent(self): def test_remaining_days_in_context(self): """Test that the correct remaining days are set in the context for the warning email.""" - self.ticket.write({"last_stage_update": datetime.today() - timedelta(days=8)}) + self.ticket.write({"last_stage_update": datetime.today() - timedelta(days=7)}) result = self.team.close_team_inactive_tickets() sent_mail = self.env["mail.mail"].search( [("id", "in", result["warning_email_ids"])], limit=1