diff --git a/helpdesk_mgmt/README.rst b/helpdesk_mgmt/README.rst
index f671734d55..7ec359b0bc 100644
--- a/helpdesk_mgmt/README.rst
+++ b/helpdesk_mgmt/README.rst
@@ -139,7 +139,7 @@ Usage
2. In the Kanban view, click in the kanban card of a team to see their
tickets and create new ones.
-|image1|
+|Tickets_Kanban|
To create a new ticket from the kanban view:
@@ -154,10 +154,10 @@ To create a new ticket from the kanban view:
8. Add a description.
9. You can also attach files to the ticket.
-|image2|
+|Tickets01|
-.. |image1| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Tickets_Kanban.PNG
-.. |image2| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Tickets01.PNG
+.. |Tickets_Kanban| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Tickets_Kanban.PNG
+.. |Tickets01| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Tickets01.PNG
Known issues / Roadmap
======================
diff --git a/helpdesk_mgmt/__manifest__.py b/helpdesk_mgmt/__manifest__.py
index 156a332f9d..3054565e7c 100644
--- a/helpdesk_mgmt/__manifest__.py
+++ b/helpdesk_mgmt/__manifest__.py
@@ -4,7 +4,7 @@
"name": "Helpdesk Management",
"summary": """
Helpdesk""",
- "version": "16.0.2.6.2",
+ "version": "17.0.1.0.0",
"license": "AGPL-3",
"category": "After-Sales",
"author": "AdaptiveCity, "
diff --git a/helpdesk_mgmt/controllers/myaccount.py b/helpdesk_mgmt/controllers/myaccount.py
index 48f559828e..05a1b5ac51 100644
--- a/helpdesk_mgmt/controllers/myaccount.py
+++ b/helpdesk_mgmt/controllers/myaccount.py
@@ -259,4 +259,4 @@ def _ticket_get_order(self, order, groupby):
field_name = groupby_mapping.get(groupby, "")
if not field_name:
return order
- return "%s, %s" % (field_name, order)
+ return f"{field_name}, {order}"
diff --git a/helpdesk_mgmt/data/helpdesk_data.xml b/helpdesk_mgmt/data/helpdesk_data.xml
index fc2d671043..b1f20f1dc3 100644
--- a/helpdesk_mgmt/data/helpdesk_data.xml
+++ b/helpdesk_mgmt/data/helpdesk_data.xml
@@ -320,7 +320,6 @@
help
-
diff --git a/helpdesk_mgmt/models/helpdesk_ticket.py b/helpdesk_mgmt/models/helpdesk_ticket.py
index 57ee374290..33111948b5 100644
--- a/helpdesk_mgmt/models/helpdesk_ticket.py
+++ b/helpdesk_mgmt/models/helpdesk_ticket.py
@@ -30,11 +30,11 @@ def _read_group_stage_ids(self, stages, domain, order):
("id", "in", stages.ids),
("team_ids", "=", False),
]
- default_team_id = self.default_get(["team_id"]).get("team_id")
+ default_team_id = self.default_get(["team_id"])
if default_team_id:
search_domain = [
"|",
- ("team_ids", "=", default_team_id),
+ ("team_ids", "=", default_team_id["team_id"]),
] + search_domain
return stages.search(search_domain, order=order)
@@ -46,10 +46,7 @@ def _read_group_stage_ids(self, stages, domain, order):
string="Assigned user",
tracking=True,
index=True,
- compute="_compute_user_id",
- store=True,
- readonly=False,
- domain="team_id and [('share', '=', False),('id', 'in', user_ids)] or [('share', '=', False)]", # noqa: B950
+ domain="team_id and [('share', '=', False),('id', 'in', user_ids)] or [('share', '=', False)]", # noqa: B950,E501
)
user_ids = fields.Many2many(
comodel_name="res.users", related="team_id.user_ids", string="Users"
@@ -132,11 +129,10 @@ def _read_group_stage_ids(self, stages, domain, order):
)
active = fields.Boolean(default=True)
- def name_get(self):
- res = []
- for rec in self:
- res.append((rec.id, rec.number + " - " + rec.name))
- return res
+ @api.depends("name")
+ def _compute_display_name(self):
+ for ticket in self:
+ ticket.display_name = f"{ticket.number} - {ticket.name}"
def assign_to_me(self):
self.write({"user_id": self.env.user.id})
@@ -217,7 +213,7 @@ def _track_template(self, tracking):
{
# Need to set mass_mail so that the email will always be sent
"composition_mode": "mass_mail",
- "auto_delete_message": True,
+ "auto_delete_keep_log": False,
"subtype_id": self.env["ir.model.data"]._xmlid_to_res_id(
"mail.mt_note"
),
diff --git a/helpdesk_mgmt/models/ir_http.py b/helpdesk_mgmt/models/ir_http.py
index e26bfdbf9f..eefd3ca92c 100644
--- a/helpdesk_mgmt/models/ir_http.py
+++ b/helpdesk_mgmt/models/ir_http.py
@@ -8,5 +8,5 @@ class IrHttp(models.AbstractModel):
@classmethod
def _get_translation_frontend_modules_name(cls):
- mods = super(IrHttp, cls)._get_translation_frontend_modules_name()
+ mods = super()._get_translation_frontend_modules_name()
return mods + ["helpdesk_mgmt"]
diff --git a/helpdesk_mgmt/readme/USAGE.md b/helpdesk_mgmt/readme/USAGE.md
index b5c32931a8..2b72f5d7b8 100644
--- a/helpdesk_mgmt/readme/USAGE.md
+++ b/helpdesk_mgmt/readme/USAGE.md
@@ -3,7 +3,7 @@
2. In the Kanban view, click in the kanban card of a team to see their
tickets and create new ones.
-![](../static/description/Tickets_Kanban.PNG)
+![Tickets_Kanban](../static/description/Tickets_Kanban.PNG)
To create a new ticket from the kanban view:
@@ -18,4 +18,4 @@ To create a new ticket from the kanban view:
8. Add a description.
9. You can also attach files to the ticket.
-![](../static/description/Tickets01.PNG)
+![Tickets01](../static/description/Tickets01.PNG)
diff --git a/helpdesk_mgmt/static/description/index.html b/helpdesk_mgmt/static/description/index.html
index 768a4243b5..ae40bca217 100644
--- a/helpdesk_mgmt/static/description/index.html
+++ b/helpdesk_mgmt/static/description/index.html
@@ -369,7 +369,7 @@
Helpdesk Management
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a5c1fe41ebe60837c24f33363511111603fcee2f9387b84bd2fe69aaaafb5938
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module adds Helpdesk functionality in Odoo.
Table of contents
@@ -407,44 +407,43 @@
-Go to Helpdesk > Configuration > Channels to edit or create new channels.
+Go to Helpdesk > Configuration > Channels to edit or create new
+channels.
Edit or create a channel.
Set the name for the channel.
You can also Activate or Deactivate channels.
-
+
-Go to Helpdesk > Configuration > Categories to edit or create new categories.
+Go to Helpdesk > Configuration > Categories to edit or create new
+categories.
Edit or create a new category.
Set the name for the category.
You can also Activate or Deactivate categories.
-
+
-Go to Helpdesk > Configuration > Stages to edit or create new stages.
+Go to Helpdesk > Configuration > Stages to edit or create new
+stages.
Edit or create a new stage.
Set the name for the stage.
Set the sequence order for the stage.
You can select an Email template.
-Mark the Unattended checkbox if the stage contains unattended tickets.
+Mark the Unattended checkbox if the stage contains unattended
+tickets.
Mark the Closed checkbox if the stage contains closed tickets.
You can add a description for the stage.
You can also Activate or Deactivate stages.
-
-
You can also sort the stage sequence if you move up or down the stages in the list view.
+
+
You can also sort the stage sequence if you move up or down the stages
+in the list view.
@@ -455,29 +454,31 @@
Add the teams members.
You can also Activate or Deactivate teams.
-
+
-
There are restrictions to read tickets according to the user’s permissions set in Helpdesk.
+
There are restrictions to read tickets according to the user’s
+permissions set in Helpdesk.
-User: Personal tickets : User is able to see their tickets (those that are assigned to their user) or those that are no team nor user is assigned.
-User: Team tickets : User is able to see all the tickets that are assigned to the teams to which he/she belongs or the tickets that are not assigned to any team nor user.
+User: Personal tickets : User is able to see their tickets (those
+that are assigned to their user) or those that are no team nor user
+is assigned.
+User: Team tickets : User is able to see all the tickets that are
+assigned to the teams to which he/she belongs or the tickets that are
+not assigned to any team nor user.
User : User is able to see all the tickets.
@@ -485,15 +486,16 @@
-Go to Helpdesk or Helpdesk > Dashboard to see the tickets dashboard
-In the Kanban view, click in the kanban card of a team to see their tickets and create new ones.
+Go to Helpdesk or Helpdesk > Dashboard to see the tickets
+dashboard
+In the Kanban view, click in the kanban card of a team to see their
+tickets and create new ones.
-
+
To create a new ticket from the kanban view:
-Press Create button or click on the plus icon at the top of the column of a stage.
+Press Create button or click on the plus icon at the top of the
+column of a stage.
Set the name or subject for the ticket.
Select the team that will manage the ticket.
You can select a user to assign the ticket.
@@ -503,16 +505,16 @@
Add a description.
You can also attach files to the ticket.
-
+
-Add a tour feature similar to what the project module defines to discover projects / tasks.
-Update portal tests defined in tests/test_portal.py to rely on tour specs (in JS)
-in order to replicate the navigation behavior of portal users.
+Add a tour feature similar to what the project module defines to
+discover projects / tasks.
+Update portal tests defined in tests/test_portal.py to rely on
+tour specs (in JS) in order to replicate the navigation behavior of
+portal users.
@@ -520,7 +522,7 @@
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 .
+
feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -600,7 +602,7 @@
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.
+
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_mgmt/tests/common.py b/helpdesk_mgmt/tests/common.py
index a41e5f35f4..b483085551 100644
--- a/helpdesk_mgmt/tests/common.py
+++ b/helpdesk_mgmt/tests/common.py
@@ -52,8 +52,9 @@ def setUpClass(cls):
def _create_ticket(self, team, user=False):
ticket = self.env["helpdesk.ticket"].create(
{
- "name": "Ticket %s (%s)"
- % (team.name, user.login if user else "unassigned"),
+ "name": "Ticket {} ({})".format(
+ team.name, user.login if user else "unassigned"
+ ),
"description": "Description",
"team_id": team.id,
"user_id": user.id if user else False,
diff --git a/helpdesk_mgmt/tests/test_helpdesk_portal.py b/helpdesk_mgmt/tests/test_helpdesk_portal.py
index a6a12a0635..38cf9487e7 100644
--- a/helpdesk_mgmt/tests/test_helpdesk_portal.py
+++ b/helpdesk_mgmt/tests/test_helpdesk_portal.py
@@ -54,7 +54,7 @@ def _create_ticket(self, partner, ticket_title, **values):
def _submit_ticket(self, **values):
data = {
- "category": self.env.ref("helpdesk_mgmt.helpdesk_category_1").id,
+ "category": self.env.ref("helpdesk_mgmt.helpdesk_category_1_demo").id,
"csrf_token": http.Request.csrf_token(self),
"subject": self.new_ticket_title,
"description": "\n".join(self.new_ticket_desc_lines),
diff --git a/helpdesk_mgmt/tests/test_helpdesk_ticket.py b/helpdesk_mgmt/tests/test_helpdesk_ticket.py
index 69aaf9c340..80ddc258be 100644
--- a/helpdesk_mgmt/tests/test_helpdesk_ticket.py
+++ b/helpdesk_mgmt/tests/test_helpdesk_ticket.py
@@ -135,7 +135,7 @@ def test_helpdesk_ticket_message_new(self):
try:
t = Ticket.message_new(msg_dict)
except Exception as error:
- self.fail("%s: %s" % (type(error), error))
+ self.fail(f"{type(error)}: {error}")
self.assertEqual(t.name, title, "The ticket should have the correct title.")
title = "New title"
@@ -143,7 +143,7 @@ def test_helpdesk_ticket_message_new(self):
try:
t.message_update(msg_dict, update_vals)
except Exception as error:
- self.fail("%s: %s" % (type(error), error))
+ self.fail(f"{type(error)}: {error}")
self.assertEqual(
t.name, title, "The ticket should have the correct (new) title."
)
diff --git a/helpdesk_mgmt/views/helpdesk_dashboard_views.xml b/helpdesk_mgmt/views/helpdesk_dashboard_views.xml
index b8325fb702..03561e5354 100644
--- a/helpdesk_mgmt/views/helpdesk_dashboard_views.xml
+++ b/helpdesk_mgmt/views/helpdesk_dashboard_views.xml
@@ -12,6 +12,28 @@
+
+
+
-
-
diff --git a/helpdesk_mgmt/views/helpdesk_ticket_category_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_category_views.xml
index c9195f9d66..6c5af531a6 100644
--- a/helpdesk_mgmt/views/helpdesk_ticket_category_views.xml
+++ b/helpdesk_mgmt/views/helpdesk_ticket_category_views.xml
@@ -36,7 +36,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
- attrs="{'invisible': [('active', '=', True)]}"
+ invisible="active"
/>
diff --git a/helpdesk_mgmt/views/helpdesk_ticket_channel_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_channel_views.xml
index 48c1092662..368f4bbe82 100644
--- a/helpdesk_mgmt/views/helpdesk_ticket_channel_views.xml
+++ b/helpdesk_mgmt/views/helpdesk_ticket_channel_views.xml
@@ -36,7 +36,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
- attrs="{'invisible': [('active', '=', True)]}"
+ invisible="active"
/>
diff --git a/helpdesk_mgmt/views/helpdesk_ticket_stage_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_stage_views.xml
index b16bd5febc..3ce9ef3f71 100644
--- a/helpdesk_mgmt/views/helpdesk_ticket_stage_views.xml
+++ b/helpdesk_mgmt/views/helpdesk_ticket_stage_views.xml
@@ -37,7 +37,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
- attrs="{'invisible': [('active', '=', True)]}"
+ invisible="active"
/>
@@ -61,10 +61,7 @@
-
+
diff --git a/helpdesk_mgmt/views/helpdesk_ticket_tag_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_tag_views.xml
index 54b2558485..eac573ece7 100644
--- a/helpdesk_mgmt/views/helpdesk_ticket_tag_views.xml
+++ b/helpdesk_mgmt/views/helpdesk_ticket_tag_views.xml
@@ -30,7 +30,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
- attrs="{'invisible': [('active', '=', True)]}"
+ invisible="active"
/>
@@ -52,7 +52,7 @@
-
+
diff --git a/helpdesk_mgmt/views/helpdesk_ticket_team_views.xml b/helpdesk_mgmt/views/helpdesk_ticket_team_views.xml
index 3fae8d5a49..9cde198998 100644
--- a/helpdesk_mgmt/views/helpdesk_ticket_team_views.xml
+++ b/helpdesk_mgmt/views/helpdesk_ticket_team_views.xml
@@ -40,7 +40,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
- attrs="{'invisible': [('active', '=', True)]}"
+ invisible="active"
/>
@@ -78,7 +78,7 @@
name="%(base_setup.action_general_configuration)d"
string="Configure domain name"
class="btn-link"
- attrs="{'invisible': [('alias_domain', '!=', False)]}"
+ invisible="alias_domain"
/>
@@ -87,7 +87,6 @@
class="oe_inline"
string="Accept Emails From"
/>
-
@@ -231,8 +231,8 @@
-
-
+
+
+
+
+
-
diff --git a/helpdesk_mgmt/views/res_config_settings_views.xml b/helpdesk_mgmt/views/res_config_settings_views.xml
index f0262dfb18..6738f54d14 100644
--- a/helpdesk_mgmt/views/res_config_settings_views.xml
+++ b/helpdesk_mgmt/views/res_config_settings_views.xml
@@ -4,56 +4,34 @@
res.config.settings
-
-
+
- New ticket form (portal)
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/helpdesk_mgmt/views/res_partner_views.xml b/helpdesk_mgmt/views/res_partner_views.xml
index c9febec55f..fc2920ad90 100644
--- a/helpdesk_mgmt/views/res_partner_views.xml
+++ b/helpdesk_mgmt/views/res_partner_views.xml
@@ -7,7 +7,7 @@