diff --git a/odoo_website_helpdesk/README.rst b/odoo_website_helpdesk/README.rst
index 50a4f273d..fa956625c 100644
--- a/odoo_website_helpdesk/README.rst
+++ b/odoo_website_helpdesk/README.rst
@@ -1,30 +1,36 @@
-HelpDesk Support
-=========================
-* HelpDesk Support for Odoo 16 community editions
+.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg
+ :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
+ :alt: License: LGPL-3
-Installation
-============
- - www.odoo.com/documentation/16.0/setup/install.html
- - Install our custom addon
+Website Helpdesk Support Ticket Management
+==========================================
-License
--------
-General Public License, Version 3 (LGPL v3).
-(https://www.odoo.com/documentation/user/15.0/legal/licenses/licenses.html)
+The module is a comprehensive solution designed to streamline and enhance
+support ticket management within your Odoo instance. This module extends the
+capabilities of Odoo's helpdesk functionality, providing a user-friendly
+interface for customers to submit, track, and manage support tickets efficiently.
+
+Configuration
+=============
+* No additional configurations needed
Company
-------
-* 'Cybrosys Techno Solutions `__
+* `Cybrosys Techno Solutions `__
-Credits
+License
-------
-* Developer:
-(v16) Robin @ Cybrosys
+General Public License, Version 3 (LGPL v3).
+(https://www.gnu.org/licenses/lgpl-3.0-standalone.html)
+Credits
+-------
+* Developer:(v16) Junaidul Ansar M , Contacts : odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
+* Website : https://cybrosys.com
Bug Tracker
-----------
@@ -32,6 +38,9 @@ Bugs are tracked on GitHub Issues. In case of trouble, please check there if you
Maintainer
==========
+.. image:: https://cybrosys.com/images/logo.png
+ :target: https://cybrosys.com
+
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com
@@ -39,4 +48,3 @@ For support and more information, please visit https://www.cybrosys.com
Further information
===================
HTML Description: ``__
-
diff --git a/odoo_website_helpdesk/__init__.py b/odoo_website_helpdesk/__init__.py
index 2ee8707d0..0fd044ce3 100644
--- a/odoo_website_helpdesk/__init__.py
+++ b/odoo_website_helpdesk/__init__.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
diff --git a/odoo_website_helpdesk/__manifest__.py b/odoo_website_helpdesk/__manifest__.py
index 20c0a76b9..e778173d3 100644
--- a/odoo_website_helpdesk/__manifest__.py
+++ b/odoo_website_helpdesk/__manifest__.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -19,52 +19,52 @@
# If not, see .
#
#############################################################################
-
{
'name': "Website Helpdesk Support Ticket Management",
- 'version': '16.0.4.0.1',
+ 'version': '16.0.3.0.0',
+ 'category': 'Website',
'summary': """Helpdesk Module for community""",
- 'description': """Can create ticket from website also and can manage it from backend.
- Bill can be created for ticket with service cost""",
+ 'description': 'Can create ticket from website also and can manage it from'
+ ' backend.Bill can be created for ticket with service cost',
'author': "Cybrosys Techno Solutions",
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
- 'category': 'Website',
- 'depends': ['base', 'website', 'project', 'sale_project', 'hr_timesheet',
- 'mail', 'contacts'],
+ 'website': 'https://www.cybrosys.com',
+ 'depends': ['base', 'website', 'project', 'sale_project',
+ 'hr_timesheet', 'mail', 'contacts'],
'data': [
- 'security/security_groups.xml',
+ 'security/odoo_website_helpdesk_security.xml',
'security/ir.model.access.csv',
- 'data/ticket_sequence.xml',
+ 'data/ir_sequence_data.xml',
'data/ticket_stage_data.xml',
- 'data/ticket_type.xml',
- 'data/ticket_auto_close.xml',
- 'data/rating_template.xml',
- 'views/team.xml',
- 'views/portal_search.xml',
- 'views/res_config_settings.xml',
+ 'data/helpdesk_types_data.xml',
+ 'data/ir_cron_data.xml',
+ 'data/mail_template_data.xml',
+ 'views/help_team_views.xml',
+ 'views/portal_search_templates.xml',
+ 'views/res_config_settings_views.xml',
'views/website_form.xml',
- 'views/report.xml',
- 'views/helpdesk.xml',
- 'views/helpdesk_views.xml',
- 'views/portal.xml',
- 'views/categories.xml',
- 'views/rating_form.xml',
+ 'views/report_templates.xml',
+ 'views/help_ticket_views.xml',
+ 'views/portal_views_templates.xml',
+ 'views/helpdesk_categories_views.xml',
+ 'views/rating_form_templates.xml',
'views/merge_tickets_views.xml',
- 'templates/helpdesk_replay_template.xml',
- 'report/helpdesk_ticket_report_template.xml',
+ 'views/helpdesk_tag_views.xml',
+ 'views/helpdesk_types_views.xml',
+ 'views/ticket_stage_views.xml',
+ 'views/helpdesk_replay_template.xml',
+ 'views/odoo_website_helpdesk_menus.xml',
+ 'report/help_ticket_templates.xml',
],
'assets': {
- # 'web.assets_frontend': [
- # ],
'web.assets_backend': [
- 'odoo_website_helpdesk/static/src/xml/helpdesk_dashboard.xml',
+ 'odoo_website_helpdesk/static/src/xml/help_ticket_templates.xml',
'odoo_website_helpdesk/static/src/js/helpdesk_dashboard_action.js',
],
'web.assets_frontend': [
'odoo_website_helpdesk/static/src/js/ticket_details.js',
- '/odoo_website_helpdesk/static/src/js/portal_search.js',
- '/odoo_website_helpdesk/static/src/js/portal_groupby.js',
+ '/odoo_website_helpdesk/static/src/js/portal_groupby_and_search.js',
'/odoo_website_helpdesk/static/src/js/multiple_product_choose.js',
'/odoo_website_helpdesk/static/src/cdn/jquery.sumoselect.min.js',
'/odoo_website_helpdesk/static/src/cdn/sumoselect.min.css',
diff --git a/odoo_website_helpdesk/controller/__init__.py b/odoo_website_helpdesk/controller/__init__.py
index 53d801a58..f5133fcde 100644
--- a/odoo_website_helpdesk/controller/__init__.py
+++ b/odoo_website_helpdesk/controller/__init__.py
@@ -1,5 +1,26 @@
-from . import website_form
-from . import portal
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
from . import helpdesk_website
+from . import portal
from . import ticket_search
from . import ticket_group_by
+from . import website
diff --git a/odoo_website_helpdesk/controller/helpdesk_website.py b/odoo_website_helpdesk/controller/helpdesk_website.py
index cc37a211b..75c3cd96c 100644
--- a/odoo_website_helpdesk/controller/helpdesk_website.py
+++ b/odoo_website_helpdesk/controller/helpdesk_website.py
@@ -1,12 +1,35 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+import datetime as DT
from odoo import http
from odoo.http import request
-import datetime as DT
class HelpDeskDashboard(http.Controller):
+ """Website helpdesk dashboard"""
@http.route(['/helpdesk_dashboard'], type='json', auth="public")
def helpdesk_dashboard(self):
+ """Helpdesk dashboard controller"""
stage_new = request.env['ticket.stage'].search(
[('name', '=', 'Inbox')], limit=1).id
stage_draft = request.env['ticket.stage'].search(
@@ -19,41 +42,40 @@ class HelpDeskDashboard(http.Controller):
[('name', '=', 'Done')], limit=1).id
stage_closed = request.env['ticket.stage'].search(
[('name', '=', 'Closed')], limit=1).id
- stage_ids = [stage_new,stage_draft]
- new = request.env["help.ticket"].search_count([('stage_id', 'in', stage_ids)])
- new_id = request.env["help.ticket"].search([('stage_id', 'in', stage_ids)])
- new_id_ls = []
- for data in new_id:
- new_id_ls.append(data.id)
- in_progress = request.env["help.ticket"].search_count([('stage_id', '=', stage_inprogress)])
- in_progress_id = request.env["help.ticket"].search([('stage_id', '=', stage_inprogress)])
- in_progress_ls = []
- for data in in_progress_id:
- in_progress_ls.append(data.id)
- canceled = request.env["help.ticket"].search_count([('stage_id', '=', stage_canceled)])
- canceled_id = request.env["help.ticket"].search([('stage_id', '=', stage_canceled)])
- canceled_id_ls = []
- for data in canceled_id:
- canceled_id_ls.append(data.id)
- done = request.env["help.ticket"].search_count([('stage_id', '=', stage_done)])
- done_id = request.env["help.ticket"].search([('stage_id', '=', stage_done)])
- done_id_ls = []
- for data in done_id:
- done_id_ls.append(data.id)
- closed = request.env["help.ticket"].search_count([('stage_id', '=', stage_closed)])
- closed_id = request.env["help.ticket"].search([('stage_id', '=', stage_closed)])
- closed_id_ls = []
- for data in closed_id:
- closed_id_ls.append(data.id)
-
+ stage_ids = [stage_new, stage_draft]
+ new = request.env["help.ticket"].search_count(
+ [('stage_id', 'in', stage_ids)])
+ new_id = request.env["help.ticket"].search(
+ [('stage_id', 'in', stage_ids)])
+ new_id_ls = [data.id for data in new_id]
+ in_progress = request.env["help.ticket"].search_count(
+ [('stage_id', '=', stage_inprogress)])
+ in_progress_id = request.env["help.ticket"].search(
+ [('stage_id', '=', stage_inprogress)])
+ in_progress_ls = [data.id for data in in_progress_id]
+ canceled = request.env["help.ticket"].search_count(
+ [('stage_id', '=', stage_canceled)])
+ canceled_id = request.env["help.ticket"].search(
+ [('stage_id', '=', stage_canceled)])
+ canceled_id_ls = [data.id for data in canceled_id]
+ done = request.env["help.ticket"].search_count(
+ [('stage_id', '=', stage_done)])
+ done_id = request.env["help.ticket"].search(
+ [('stage_id', '=', stage_done)])
+ done_id_ls = [data.id for data in done_id]
+ closed = request.env["help.ticket"].search_count(
+ [('stage_id', '=', stage_closed)])
+ closed_id = request.env["help.ticket"].search(
+ [('stage_id', '=', stage_closed)])
+ closed_id_ls = [data.id for data in closed_id]
dashboard_values = {
- 'new':new,
- 'in_progress':in_progress,
- 'canceled':canceled,
- 'done':done,
- 'closed':closed,
- 'new_id':new_id_ls,
- 'in_progress_id':in_progress_ls,
+ 'new': new,
+ 'in_progress': in_progress,
+ 'canceled': canceled,
+ 'done': done,
+ 'closed': closed,
+ 'new_id': new_id_ls,
+ 'in_progress_id': in_progress_ls,
'canceled_id': canceled_id_ls,
'done_id': done_id_ls,
'closed_id': closed_id_ls,
@@ -62,6 +84,7 @@ class HelpDeskDashboard(http.Controller):
@http.route(['/helpdesk_dashboard_week'], type='json', auth="public")
def helpdesk_dashboard_week(self):
+ """Week based sorting controller"""
today = DT.date.today()
stage_new = request.env['ticket.stage'].search(
[('name', '=', 'Inbox')], limit=1).id
@@ -81,38 +104,31 @@ class HelpDeskDashboard(http.Controller):
[('stage_id', 'in', stage_ids), ('create_date', '>', week_ago)])
new_id = request.env["help.ticket"].search(
[('stage_id', 'in', stage_ids), ('create_date', '>', week_ago)])
- new_id_ls = []
- for data in new_id:
- new_id_ls.append(data.id)
+ new_id_ls = [data.id for data in new_id]
in_progress = request.env["help.ticket"].search_count(
- [('stage_id', '=', stage_inprogress), ('create_date', '>', week_ago)])
+ [('stage_id', '=', stage_inprogress),
+ ('create_date', '>', week_ago)])
in_progress_id = request.env["help.ticket"].search(
- [('stage_id', '=', stage_inprogress), ('create_date', '>', week_ago)])
- in_progress_ls = []
- for data in in_progress_id:
- in_progress_ls.append(data.id)
+ [('stage_id', '=', stage_inprogress),
+ ('create_date', '>', week_ago)])
+ in_progress_ls = [data.id for data in in_progress_id]
canceled = request.env["help.ticket"].search_count(
- [('stage_id', '=', stage_canceled), ('create_date', '>', week_ago)])
+ [('stage_id', '=', stage_canceled),
+ ('create_date', '>', week_ago)])
canceled_id = request.env["help.ticket"].search(
- [('stage_id', '=', stage_canceled), ('create_date', '>', week_ago)])
- canceled_id_ls = []
- for data in canceled_id:
- canceled_id_ls.append(data.id)
+ [('stage_id', '=', stage_canceled),
+ ('create_date', '>', week_ago)])
+ canceled_id_ls = [data.id for data in canceled_id]
done = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_done), ('create_date', '>', week_ago)])
done_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_done), ('create_date', '>', week_ago)])
- done_id_ls = []
- for data in done_id:
- done_id_ls.append(data.id)
+ done_id_ls = [data.id for data in done_id]
closed = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_closed), ('create_date', '>', week_ago)])
closed_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_closed), ('create_date', '>', week_ago)])
- closed_id_ls = []
- for data in closed_id:
- closed_id_ls.append(data.id)
-
+ closed_id_ls = [data.id for data in closed_id]
dashboard_values = {
'new': new,
'in_progress': in_progress,
@@ -129,6 +145,7 @@ class HelpDeskDashboard(http.Controller):
@http.route(['/helpdesk_dashboard_month'], type='json', auth="public")
def helpdesk_dashboard_month(self):
+ """Month based sorting controller"""
today = DT.date.today()
stage_new = request.env['ticket.stage'].search(
[('name', '=', 'Inbox')], limit=1).id
@@ -148,42 +165,31 @@ class HelpDeskDashboard(http.Controller):
[('stage_id', 'in', stage_ids), ('create_date', '>', week_ago)])
new_id = request.env["help.ticket"].search(
[('stage_id', 'in', stage_ids), ('create_date', '>', week_ago)])
- new_id_ls = []
- for data in new_id:
- new_id_ls.append(data.id)
+ new_id_ls = [data.id for data in new_id]
in_progress = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_inprogress),
('create_date', '>', week_ago)])
in_progress_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_inprogress),
('create_date', '>', week_ago)])
- in_progress_ls = []
- for data in in_progress_id:
- in_progress_ls.append(data.id)
+ in_progress_ls = [data.id for data in in_progress_id]
canceled = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_canceled),
('create_date', '>', week_ago)])
canceled_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_canceled),
('create_date', '>', week_ago)])
- canceled_id_ls = []
- for data in canceled_id:
- canceled_id_ls.append(data.id)
+ canceled_id_ls = [data.id for data in canceled_id]
done = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_done), ('create_date', '>', week_ago)])
done_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_done), ('create_date', '>', week_ago)])
- done_id_ls = []
- for data in done_id:
- done_id_ls.append(data.id)
+ done_id_ls = [data.id for data in done_id]
closed = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_closed), ('create_date', '>', week_ago)])
closed_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_closed), ('create_date', '>', week_ago)])
- closed_id_ls = []
- for data in closed_id:
- closed_id_ls.append(data.id)
-
+ closed_id_ls = [data.id for data in closed_id]
dashboard_values = {
'new': new,
'in_progress': in_progress,
@@ -200,6 +206,7 @@ class HelpDeskDashboard(http.Controller):
@http.route(['/helpdesk_dashboard_year'], type='json', auth="public")
def helpdesk_dashboard_year(self):
+ """Year based sorting"""
today = DT.date.today()
stage_new = request.env['ticket.stage'].search(
[('name', '=', 'Inbox')], limit=1).id
@@ -219,42 +226,31 @@ class HelpDeskDashboard(http.Controller):
[('stage_id', 'in', stage_ids), ('create_date', '>', week_ago)])
new_id = request.env["help.ticket"].search(
[('stage_id', 'in', stage_ids), ('create_date', '>', week_ago)])
- new_id_ls = []
- for data in new_id:
- new_id_ls.append(data.id)
+ new_id_ls = [data.id for data in new_id]
in_progress = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_inprogress),
('create_date', '>', week_ago)])
in_progress_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_inprogress),
('create_date', '>', week_ago)])
- in_progress_ls = []
- for data in in_progress_id:
- in_progress_ls.append(data.id)
+ in_progress_ls = [data.id for data in in_progress_id]
canceled = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_canceled),
('create_date', '>', week_ago)])
canceled_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_canceled),
('create_date', '>', week_ago)])
- canceled_id_ls = []
- for data in canceled_id:
- canceled_id_ls.append(data.id)
+ canceled_id_ls = [data.id for data in canceled_id]
done = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_done), ('create_date', '>', week_ago)])
done_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_done), ('create_date', '>', week_ago)])
- done_id_ls = []
- for data in done_id:
- done_id_ls.append(data.id)
+ done_id_ls = [data.id for data in done_id]
closed = request.env["help.ticket"].search_count(
[('stage_id', '=', stage_closed), ('create_date', '>', week_ago)])
closed_id = request.env["help.ticket"].search(
[('stage_id', '=', stage_closed), ('create_date', '>', week_ago)])
- closed_id_ls = []
- for data in closed_id:
- closed_id_ls.append(data.id)
-
+ closed_id_ls = [data.id for data in closed_id]
dashboard_values = {
'new': new,
'in_progress': in_progress,
@@ -267,4 +263,4 @@ class HelpDeskDashboard(http.Controller):
'done_id': done_id_ls,
'closed_id': closed_id_ls,
}
- return dashboard_values
\ No newline at end of file
+ return dashboard_values
diff --git a/odoo_website_helpdesk/controller/portal.py b/odoo_website_helpdesk/controller/portal.py
index fc578d7bf..3a9d18043 100644
--- a/odoo_website_helpdesk/controller/portal.py
+++ b/odoo_website_helpdesk/controller/portal.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -19,15 +19,18 @@
# If not, see .
#
#############################################################################
-
from odoo import http
from odoo.addons.portal.controllers import portal
from odoo.http import request
class TicketPortal(portal.CustomerPortal):
-
+ """ Controller for handling customer portal related actions related to
+ helpdesk tickets.
+ """
def _prepare_home_portal_values(self, counters):
+ """Prepares a dictionary of values to be used in the home portal view
+ and get their count."""
values = super()._prepare_home_portal_values(counters)
if 'ticket_count' in counters:
ticket_count = request.env['help.ticket'].search_count(
@@ -37,14 +40,16 @@ class TicketPortal(portal.CustomerPortal):
values['ticket_count'] = ticket_count
return values
- # checking domain:
def _get_tickets_domain(self):
+ """Checking the domain"""
return [('customer_id', '=', request.env.user.partner_id.id)]
@http.route(['/my/tickets'], type='http', auth="user", website=True)
def portal_my_tickets(self):
+ """Displays a list of tickets for the current user in the user's
+ portal."""
domain = self._get_tickets_domain()
- tickets = request.env['help.ticket'].sudo().search(domain)
+ tickets = request.env['help.ticket'].search(domain)
values = {
'default_url': "/my/tickets",
'tickets': tickets,
@@ -56,6 +61,8 @@ class TicketPortal(portal.CustomerPortal):
@http.route(['/my/tickets/'], type='http', auth="public",
website=True)
def portal_tickets_details(self, id):
+ """Displays a list of tickets for the current user in the user's
+ portal."""
details = request.env['help.ticket'].sudo().search([('id', '=', id)])
data = {
'page_name': 'ticket',
@@ -69,6 +76,8 @@ class TicketPortal(portal.CustomerPortal):
type='http',
website=True)
def ticket_download_portal(self, id):
+ """Download the ticket information in a pdf formate of the current
+ event ticket."""
data = {
'help': request.env['help.ticket'].sudo().browse(int(id))}
report = request.env.ref(
@@ -84,9 +93,11 @@ class TicketPortal(portal.CustomerPortal):
class WebsiteDesk(http.Controller):
- @http.route(['/helpdesk_ticket'], type='http', auth="public", website=True,
- sitemap=True)
- def helpdesk_ticket(self, **kwargs):
+ """Control for handling the helpdesk tickets form and its submission."""
+ @http.route(['/helpdesk_ticket'], type='http', auth="public",
+ website=True, sitemap=True)
+ def helpdesk_ticket(self):
+ """Render the helpdesk ticket form."""
types = request.env['helpdesk.types'].sudo().search([])
categories = request.env['helpdesk.categories'].sudo().search([])
product = request.env['product.template'].sudo().search([])
@@ -102,16 +113,19 @@ class WebsiteDesk(http.Controller):
website=True,
sitemap=True)
def rating(self, ticket_id):
+ """Render the helpdesk ticket rating form."""
ticket = request.env['help.ticket'].browse(ticket_id)
data = {
'ticket': ticket.id,
}
return request.render('odoo_website_helpdesk.rating_form', data)
- @http.route(['/rating//submit'], type='http', auth="user",
+ @http.route(['/rating//submit'], type='http',
+ auth="user",
website=True, csrf=False,
sitemap=True)
def rating_backend(self, ticket_id, **post):
+ """Render the thanks page after rating the helpdesk ticket."""
ticket = request.env['help.ticket'].browse(ticket_id)
ticket.write({
'customer_rating': post['rating'],
diff --git a/odoo_website_helpdesk/controller/ticket_group_by.py b/odoo_website_helpdesk/controller/ticket_group_by.py
index 2a54e73a5..ca9c1a9a7 100644
--- a/odoo_website_helpdesk/controller/ticket_group_by.py
+++ b/odoo_website_helpdesk/controller/ticket_group_by.py
@@ -1,24 +1,46 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
from odoo import http
from odoo.http import request
class TicketGroupBy(http.Controller):
+ """Control for handle the customer portal groupBy
+ filtering by the tickets."""
@http.route(['/ticketgroupby'], type='json', auth="public", website=True)
def ticket_group_by(self, **kwargs):
+ """Display the list of tickets based on the groupBy filtering"""
context = []
group_value = kwargs.get("search_value")
if group_value == '0':
context = []
- tickets = request.env["help.ticket"].search(
- [('user_id', '=', request.env.user.id)])
+ tickets = request.env["help.ticket"].search([])
context.append(tickets)
if group_value == '1':
context = []
stage_ids = request.env['ticket.stage'].search([])
for stage in stage_ids:
ticket_ids = request.env['help.ticket'].search([
- ('stage_id', '=', stage.id),
- ('user_id', '=', request.env.user.id)
+ ('stage_id', '=', stage.id)
])
if ticket_ids:
context.append({
@@ -30,15 +52,13 @@ class TicketGroupBy(http.Controller):
type_ids = request.env['helpdesk.types'].search([])
for types in type_ids:
ticket_ids_1 = request.env['help.ticket'].search([
- ('ticket_type', '=', types.id),
- ('user_id', '=', request.env.user.id)
+ ('ticket_type', '=', types.id)
])
if ticket_ids_1:
context.append({
'name': types.name,
'data': ticket_ids_1
})
-
values = {
'tickets': context,
}
diff --git a/odoo_website_helpdesk/controller/ticket_search.py b/odoo_website_helpdesk/controller/ticket_search.py
index 2d7a500d0..b965041fa 100644
--- a/odoo_website_helpdesk/controller/ticket_search.py
+++ b/odoo_website_helpdesk/controller/ticket_search.py
@@ -1,15 +1,39 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
from odoo import http
from odoo.http import request
class TicketSearch(http.Controller):
+ """Control for handle the customer portal search
+ filtering by the tickets."""
@http.route(['/ticketsearch'], type='json', auth="public", website=True)
def ticket_search(self, **kwargs):
+ """ Display the list of tickets satisfying the searching condition.
+ Searching the ticket based on name or subject"""
search_value = kwargs.get("search_value")
tickets = request.env["help.ticket"].search(
['|', ('name', 'ilike', search_value),
('subject', 'ilike', search_value)])
-
values = {
'tickets': tickets,
}
diff --git a/odoo_website_helpdesk/controller/website_form.py b/odoo_website_helpdesk/controller/website.py
similarity index 83%
rename from odoo_website_helpdesk/controller/website_form.py
rename to odoo_website_helpdesk/controller/website.py
index 39cec9c8e..1031ef821 100644
--- a/odoo_website_helpdesk/controller/website_form.py
+++ b/odoo_website_helpdesk/controller/website.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -21,34 +21,35 @@
#############################################################################
import base64
import json
-
-from psycopg2 import IntegrityError
-
from odoo import _, http
-from odoo.addons.website.controllers.form import WebsiteForm
-from odoo.exceptions import ValidationError
+from psycopg2 import IntegrityError
from odoo.http import request
+from odoo.exceptions import ValidationError
+from odoo.addons.website.controllers.form import WebsiteForm
-class helpdesk_product(http.Controller):
+class HelpdeskProduct(http.Controller):
+ """It controls the website products and return the product."""
@http.route('/product', auth='public', type='json')
def product(self):
- prols = []
- acc = request.env['product.template'].sudo().search([])
- for i in acc:
- dic = {'name': i['name'],
- 'id': i['id']}
- prols.append(dic)
- return prols
+ """Product control function"""
+ products = request.env['product.template'].sudo().search_read([],
+ ['name',
+ 'id'])
+ return products
class WebsiteFormInherit(WebsiteForm):
-
+ """This module extends the functionality of the website form controller
+ to handle the creation of new help desk tickets. It provides a new
+ controller to display a list of tickets for the current user in their
+ portal, and overrides the website form controller's method for handling
+ form submissions to create a new help desk ticket instead."""
def _handle_website_form(self, model_name, **kwargs):
+ """Website Help Desk Form"""
customer = request.env.user.partner_id
if model_name == 'help.ticket':
- tickets = request.env['ticket.stage'].sudo().search(
- [])
+ tickets = request.env['ticket.stage'].search([])
for rec in tickets:
sequence = tickets.mapped('sequence')
lowest_sequence = tickets.filtered(
@@ -66,7 +67,7 @@ class WebsiteFormInherit(WebsiteForm):
'email': kwargs.get('email_from'),
'phone': kwargs.get('phone'),
'priority': kwargs.get('priority'),
- 'product_id': product_list,
+ 'product_ids': product_list,
'stage_id': lowest_stage_id.id,
'customer_id': customer.id,
'ticket_type': kwargs.get('ticket_type'),
@@ -78,8 +79,9 @@ class WebsiteFormInherit(WebsiteForm):
model_record = request.env['ir.model'].sudo().search(
[('model', '=', model_name)])
data = self.extract_data(model_record, request.params)
- if 'ticket_attachment' in request.params or request.httprequest.files or data.get(
- 'attachments'):
+ if ('ticket_attachment' in request.params or
+ request.httprequest.files or data.get(
+ 'attachments')):
attached_files = data.get('attachments')
for attachment in attached_files:
attached_file = attachment.read()
@@ -96,9 +98,6 @@ class WebsiteFormInherit(WebsiteForm):
request.session['form_builder_id'] = ticket_id.id
return json.dumps({'id': ticket_id.id})
else:
- lowest_sequence = tickets.filtered(
- lambda x: x.sequence == min(sequence))
- lowest_stage_id = lowest_sequence
rec_val = {
'customer_name': kwargs.get('customer_name'),
'subject': kwargs.get('subject'),
@@ -117,8 +116,9 @@ class WebsiteFormInherit(WebsiteForm):
model_record = request.env['ir.model'].sudo().search(
[('model', '=', model_name)])
data = self.extract_data(model_record, request.params)
- if 'ticket_attachment' in request.params or request.httprequest.files or data.get(
- 'attachments'):
+ if ('ticket_attachment' in request.params or
+ request.httprequest.files or data.get(
+ 'attachments')):
attached_files = data.get('attachments')
for attachment in attached_files:
attached_file = attachment.read()
@@ -152,8 +152,8 @@ class WebsiteFormInherit(WebsiteForm):
if id_record:
self.insert_attachment(model_record, id_record,
data['attachments'])
- # in case of an email, we want to send it immediately instead of waiting
- # for the email queue to process
+ # In case of an email, we want to send it immediately instead of waiting
+ # For the email queue to process
if model_name == 'mail.mail':
request.env[model_name].sudo().browse(id_record).send()
@@ -162,9 +162,7 @@ class WebsiteFormInherit(WebsiteForm):
# TODO: How to get the name of the erroneous field ?
except IntegrityError:
return json.dumps(False)
-
request.session['form_builder_model_model'] = model_record.model
request.session['form_builder_model'] = model_record.name
request.session['form_builder_id'] = id_record
-
return json.dumps({'id': id_record})
diff --git a/odoo_website_helpdesk/data/helpdesk_types_data.xml b/odoo_website_helpdesk/data/helpdesk_types_data.xml
new file mode 100644
index 000000000..f2bc285c2
--- /dev/null
+++ b/odoo_website_helpdesk/data/helpdesk_types_data.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ Question
+
+
+ Issue
+
+
+ Repair
+
+
+ Maintenance
+
+
+ Internal
+
+
+ Technical
+
+
diff --git a/odoo_website_helpdesk/data/ir_cron_data.xml b/odoo_website_helpdesk/data/ir_cron_data.xml
new file mode 100644
index 000000000..17894d9ed
--- /dev/null
+++ b/odoo_website_helpdesk/data/ir_cron_data.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ Auto Close Ticket
+
+ code
+ model.auto_close_ticket()
+
+ 1
+ days
+ -1
+
+
+
diff --git a/odoo_website_helpdesk/data/ticket_sequence.xml b/odoo_website_helpdesk/data/ir_sequence_data.xml
similarity index 80%
rename from odoo_website_helpdesk/data/ticket_sequence.xml
rename to odoo_website_helpdesk/data/ir_sequence_data.xml
index 936fb958a..0323aafd7 100644
--- a/odoo_website_helpdesk/data/ticket_sequence.xml
+++ b/odoo_website_helpdesk/data/ir_sequence_data.xml
@@ -1,13 +1,14 @@
+
+
Helpdeskhelp.ticketTKT5
-
-
+ 1
-
+
Helpdesk Invoiceticket.invoice
@@ -17,4 +18,3 @@
-
diff --git a/odoo_website_helpdesk/data/mail_template_data.xml b/odoo_website_helpdesk/data/mail_template_data.xml
new file mode 100644
index 000000000..56cfd5d36
--- /dev/null
+++ b/odoo_website_helpdesk/data/mail_template_data.xml
@@ -0,0 +1,211 @@
+
+
+
+
+ Create Ticket
+
+
+ {{object.customer_id.email}}
+ Ticket Created
+
+
+ Dear
+
+
+ Your Ticket
+
+ is Created and Assigned.Kindly Wait while we're resolving
+ your Query
+
+
+ Thanks.
+
+
+
+
+
+ Close Ticket And Feedback
+
+
+ {{object.customer_id.email}}
+ Ticket Closed
+
+
+ Dear
+
+ Your Ticket
+
+ Is Closed
+
+
+
+
+ Thanks.
+
- Dear
-
-
- Your Ticket
-
- is Canceled Due to Some Reasons
-
-
- Thanks.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/odoo_website_helpdesk/data/ticket_auto_close.xml b/odoo_website_helpdesk/data/ticket_auto_close.xml
deleted file mode 100644
index 3d54d5232..000000000
--- a/odoo_website_helpdesk/data/ticket_auto_close.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
- Auto Close Ticket
-
- code
- model.auto_close_ticket()
-
- 1
- days
- -1
-
-
- Ticket Assign
-
-
-
-
-
-
-
Dear,
-
Your team has been given the ticket [] kindly complete your work carefully.
-
-
-
Details
-
Subject :
-
Customer :
-
Description :
-
-
Best regards
-
-
-
-
- Ticket Assign to User
-
-
-
-
-
-
-
Dear,
-
Ticket [] Assign to you , kindly complete your work carefully.
-
-
-
Details
-
Subject :
-
Customer :
-
Description :
-
-
Best regards
-
-
-
-
- Mail To Customer Assign to User
-
-
-
-
-
-
-
Dear,
-
Ticket [] successfully assigned to "".
-
-
-
Best regards
-
-
-
-
-
\ No newline at end of file
diff --git a/odoo_website_helpdesk/data/ticket_stage_data.xml b/odoo_website_helpdesk/data/ticket_stage_data.xml
index 2f0674c84..0ee6cbb5e 100644
--- a/odoo_website_helpdesk/data/ticket_stage_data.xml
+++ b/odoo_website_helpdesk/data/ticket_stage_data.xml
@@ -1,31 +1,39 @@
-
+ 10Inbox
-
+
+ 15Draft
-
- 25
- Done
-
-
+
+ 20In Progress
-
- 30
- True
- Closed
+
+
+ 25
+ Done
+
-
- 35
- True
+
+
+ 30Canceled
+
+
+
+
+
+ 29
+ Closed
+
+
diff --git a/odoo_website_helpdesk/data/ticket_type.xml b/odoo_website_helpdesk/data/ticket_type.xml
deleted file mode 100644
index 69bc99ff0..000000000
--- a/odoo_website_helpdesk/data/ticket_type.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- Question
-
-
- Issue
-
-
- Repair
-
-
- Maintenance
-
-
- Internal
-
-
- Technical
-
-
\ No newline at end of file
diff --git a/odoo_website_helpdesk/doc/RELEASE_NOTES.md b/odoo_website_helpdesk/doc/RELEASE_NOTES.md
index 052a9daaa..aca354874 100644
--- a/odoo_website_helpdesk/doc/RELEASE_NOTES.md
+++ b/odoo_website_helpdesk/doc/RELEASE_NOTES.md
@@ -1,13 +1,6 @@
## Module
-#### 01.09.2023
+#### 04.12.2023
#### Version 16.0.1.0.0
#### ADD
-
-- Initial commit for Website Helpdesk Support Ticket
-
-#### 28.11.2023
-#### Version 16.0.1.0.1
-#### FIX
-
-- Updated the End date when changed the stage to Closed
+- Initial commit for Website Helpdesk Support Ticket Management
diff --git a/odoo_website_helpdesk/models/__init__.py b/odoo_website_helpdesk/models/__init__.py
index c9e36e6fb..8e55983aa 100644
--- a/odoo_website_helpdesk/models/__init__.py
+++ b/odoo_website_helpdesk/models/__init__.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -19,11 +19,16 @@
# If not, see .
#
#############################################################################
-from . import helpdesk
-from . import task
-from . import res_config
-from . import categories
-from . import heldesk_team
-from . import mail_compose
+from . import account_move
+from . import help_team
+from . import help_ticket
+from . import helpdesk_categories
+from . import helpdesk_tag
+from . import helpdesk_types
+from . import mail_compose_message
from . import merge_tickets
+from . import project_task
+from . import res_config_settings
from . import support_tickets
+from . import ticket_stage
+from . import website_menu
diff --git a/odoo_website_helpdesk/models/task.py b/odoo_website_helpdesk/models/account_move.py
similarity index 76%
rename from odoo_website_helpdesk/models/task.py
rename to odoo_website_helpdesk/models/account_move.py
index c6721ed87..0e7b24da0 100644
--- a/odoo_website_helpdesk/models/task.py
+++ b/odoo_website_helpdesk/models/account_move.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -22,16 +22,10 @@
from odoo import fields, models
-class Task(models.Model):
- """Inheriting the project task"""
- _inherit = 'project.task'
-
- ticket_id = fields.Many2one('help.ticket', string='Ticket',
- help='Ticket')
-
-
class AccountMove(models.Model):
- """Inheriting the account.move model"""
+ """ This class extends the functionality of the 'account.move' model to
+ include a reference to a help ticket through the 'ticket_id' field."""
_inherit = 'account.move'
- ticket_id = fields.Many2one('help.ticket', string='Ticket')
+ ticket_id = fields.Many2one('help.ticket', string='Ticket',
+ help='Choose the tickets')
diff --git a/odoo_website_helpdesk/models/heldesk_team.py b/odoo_website_helpdesk/models/heldesk_team.py
deleted file mode 100644
index 714ae3474..000000000
--- a/odoo_website_helpdesk/models/heldesk_team.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- coding: utf-8 -*-
-#############################################################################
-#
-# Cybrosys Technologies Pvt. Ltd.
-#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
-# Author: Cybrosys Techno Solutions()
-#
-# You can modify it under the terms of the GNU LESSER
-# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
-#
-# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
-# (LGPL v3) along with this program.
-# If not, see .
-#
-#############################################################################
-from odoo import api, fields, models
-
-
-class HelpDeskTeam(models.Model):
- """Helpdesk team"""
- _name = 'help.team'
- _description = 'Helpdesk Team'
-
- name = fields.Char('Name', help='Helpdesk Team Name')
- team_lead_id = fields.Many2one('res.users', string='Team Leader',
- help='Team Leader Name',
- domain=lambda self: [
- ('groups_id', 'in', self.env.ref(
- 'odoo_website_helpdesk.helpdesk_team_leader').id)])
- member_ids = fields.Many2many('res.users', string='Members',
- help='Team Members',
- domain=lambda self: [
- ('groups_id', 'in', self.env.ref(
- 'odoo_website_helpdesk.helpdesk_user').id)])
- email = fields.Char('Email', help='Email')
- project_id = fields.Many2one('project.project',
- string='Project',
- help='Projects')
- create_task = fields.Boolean(string="Create Task",
- help="Task created or not")
-
- @api.onchange('team_lead_id')
- def members_choose(self):
- """Members selection function"""
- fetch_memebers = self.env['res.users'].search([])
- filterd_members = fetch_memebers.filtered(
- lambda x: x.id != self.team_lead_id.id)
- return {'domain': {'member_ids':
- [('id', '=', filterd_members.ids), (
- 'groups_id', 'in',
- self.env.ref('base.group_user').id),
- ('groups_id', 'not in', self.env.ref(
- 'odoo_website_helpdesk.helpdesk_team_leader').id)]}}
diff --git a/odoo_website_helpdesk/models/help_team.py b/odoo_website_helpdesk/models/help_team.py
new file mode 100644
index 000000000..d4839a50a
--- /dev/null
+++ b/odoo_website_helpdesk/models/help_team.py
@@ -0,0 +1,65 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import api, fields, models
+
+
+class HelpTeam(models.Model):
+ """ This class represents a Helpdesk Team in the system, providing
+ information about the team members, leader, and related project."""
+ _name = 'help.team'
+ _description = 'Helpdesk Team'
+
+ name = fields.Char(string='Name', help='Name of the Helpdesk Team. It '
+ 'identify the helpdesk team')
+ team_lead_id = fields.Many2one(
+ 'res.users',
+ string='Team Leader',
+ help='Name of the Helpdesk Team Leader.',
+ domain=lambda self: [('groups_id', 'in', self.env.ref(
+ 'odoo_website_helpdesk.helpdesk_team_leader').id)])
+ member_ids = fields.Many2many(
+ 'res.users',
+ string='Members',
+ help='Users who belong to that Helpdesk Team',
+ domain=lambda self: [('groups_id', 'in', self.env.ref(
+ 'odoo_website_helpdesk.helpdesk_user').id)])
+ email = fields.Char(string='Email', help='Email')
+ project_id = fields.Many2one('project.project',
+ string='Project',
+ help='The Project they are currently in')
+ create_task = fields.Boolean(string="Create Task",
+ help="Enable for allowing team to "
+ "create tasks from tickets")
+
+ @api.onchange('team_lead_id')
+ def members_choose(self):
+ """ This method is triggered when the Team Leader is changed. It
+ updates the available team members based on the selected leader and
+ filters out the leader from the list of potential members."""
+ fetch_members = self.env['res.users'].search([])
+ filtered_members = fetch_members.filtered(
+ lambda x: x.id != self.team_lead_id.id)
+ return {'domain': {'member_ids': [
+ ('id', '=', filtered_members.ids),
+ ('groups_id', 'in', self.env.ref('base.group_user').id),
+ ('groups_id', 'not in', self.env.ref(
+ 'odoo_website_helpdesk.helpdesk_team_leader').id)]}}
diff --git a/odoo_website_helpdesk/models/helpdesk.py b/odoo_website_helpdesk/models/help_ticket.py
similarity index 53%
rename from odoo_website_helpdesk/models/helpdesk.py
rename to odoo_website_helpdesk/models/help_ticket.py
index 11d2cfaaf..eccdd8fb6 100644
--- a/odoo_website_helpdesk/models/helpdesk.py
+++ b/odoo_website_helpdesk/models/help_ticket.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -20,7 +20,7 @@
#
#############################################################################
import logging
-from odoo import models, fields, api, _
+from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.exceptions import ValidationError
@@ -43,111 +43,155 @@ RATING = [
]
-class HelpDeskTicket(models.Model):
- """Help_ticket model"""
+class HelpTicket(models.Model):
+ """This model represents the Helpdesk Ticket, which allows users to raise
+ tickets related to products, services or any other issues. Each ticket has a
+ name, customer information, description, team responsible for handling
+ requests, associated project, priority level, stage, cost per hour, service
+ product, start and end dates, and related tasks and invoices."""
+
_name = 'help.ticket'
- _description = 'Helpdesk Ticket'
+ _description = 'Help Ticket'
_inherit = ['mail.thread', 'mail.activity.mixin']
- name = fields.Char('Name', default=lambda self: self.env['ir.sequence'].
- next_by_code('help.ticket') or _('New'))
+ name = fields.Char(string='Name', default=lambda self: _('New'),
+ help='The name of the help ticket. By default, a new '
+ 'unique sequence number is assigned to each '
+ 'help ticket, unless a name is provided.',
+ readonly=True)
+ active = fields.Boolean(default=True, help='Active', string='Active')
customer_id = fields.Many2one('res.partner',
string='Customer Name',
- help='Customer Name')
- customer_name = fields.Char('Customer Name', help='Customer Name')
- subject = fields.Text('Subject', required=True,
+ help='Select the Customer Name')
+ customer_name = fields.Char(string='Customer Name',
+ help='Add the Customer Name')
+ subject = fields.Text(string='Subject', required=True,
help='Subject of the Ticket')
- description = fields.Text('Description', required=True,
- help='Description')
- email = fields.Char('Email', help='Email')
- phone = fields.Char('Phone', help='Contact Number')
+ description = fields.Text(string='Description', required=True,
+ help='Issue Description')
+ email = fields.Char(string='Email', help='Email of the User.')
+ phone = fields.Char(string='Phone', help='Phone Number of the user')
team_id = fields.Many2one('help.team', string='Helpdesk Team',
- help='Helpdesk Team Name')
- product_id = fields.Many2many('product.template',
- string='Product',
- help='Product Name')
+ help='The helpdesk team responsible for '
+ 'handling requests related to this '
+ 'record')
+ product_ids = fields.Many2many('product.template',
+ string='Product',
+ help='The product associated with this '
+ 'record.This field allows you to select'
+ 'an existing product from the product '
+ 'catalog.')
project_id = fields.Many2one('project.project',
string='Project',
readonly=False,
related='team_id.project_id',
store=True,
- help='Project Name')
-
- priority = fields.Selection(PRIORITIES, default='1', help='Priority of the'
- ' Ticket')
+ help='The project associated with this team.'
+ 'This field is automatically filled '
+ 'based on the project assigned to '
+ 'the team.')
+ priority = fields.Selection(PRIORITIES,
+ default='1',
+ help='Set the priority level',
+ string='Priority')
stage_id = fields.Many2one('ticket.stage', string='Stage',
default=lambda self: self.env[
'ticket.stage'].search(
[('name', '=', 'Draft')], limit=1).id,
tracking=True,
group_expand='_read_group_stage_ids',
- help='Stages')
+ help='Stages of the ticket.')
user_id = fields.Many2one('res.users',
default=lambda self: self.env.user,
check_company=True,
index=True, tracking=True,
help='Login User')
- cost = fields.Float('Cost per hour', help='Cost Per Unit')
+ cost = fields.Float(string='Cost per hour',
+ help='The cost per hour for this record. This field '
+ 'specifies the hourly cost associated with the'
+ 'record, which can be used in various '
+ 'calculations or reports.')
service_product_id = fields.Many2one('product.product',
string='Service Product',
- help='Service Product',
+ help='The product associated with this'
+ 'service. Only service products '
+ 'are available for selection.',
domain=[
('detailed_type', '=', 'service')])
- create_date = fields.Datetime('Creation Date', help='Created date')
- start_date = fields.Datetime('Start Date', help='Start Date')
- end_date = fields.Datetime('End Date', help='End Date')
+ create_date = fields.Datetime(string='Creation Date', help='Created date of'
+ 'the Ticket')
+ start_date = fields.Datetime(string='Start Date', help='Start Date of the '
+ 'Ticket')
+ end_date = fields.Datetime(string='End Date', help='End Date of the Ticket')
public_ticket = fields.Boolean(string="Public Ticket", help='Public Ticket')
invoice_ids = fields.Many2many('account.move',
string='Invoices',
- help='Invoicing id'
+ help='To Generate Invoice based on hours '
+ 'spent on the ticket'
)
task_ids = fields.Many2many('project.task',
string='Tasks',
- help='Task id')
+ help='Related Task of the Ticket')
color = fields.Integer(string="Color", help='Color')
- replied_date = fields.Datetime('Replied date', help='Replied Date')
- last_update_date = fields.Datetime('Last Update Date',
- help='Last Update Date')
+ replied_date = fields.Datetime(string='Replied date',
+ help='Replied Date of the Ticket')
+ last_update_date = fields.Datetime(string='Last Update Date',
+ help='Last Update Date of Ticket')
ticket_type = fields.Many2one('helpdesk.types',
string='Ticket Type', help='Ticket Type')
team_head = fields.Many2one('res.users', string='Team Leader',
compute='_compute_team_head',
help='Team Leader Name')
- assigned_user = fields.Many2one('res.users',
- domain=lambda self: [
- ('groups_id', 'in', self.env.ref(
- 'odoo_website_helpdesk.helpdesk_user').id)],
- help='Assigned User Name')
+ assigned_user = fields.Many2one(
+ 'res.users',
+ string='Assigned User',
+ domain=lambda self: [('groups_id', 'in', self.env.ref(
+ 'odoo_website_helpdesk.helpdesk_user').id)],
+ help='Choose the Assigned User Name')
category_id = fields.Many2one('helpdesk.categories',
- help='Category')
- tags = fields.Many2many('helpdesk.tag', help='Tags')
- assign_user = fields.Boolean(default=False, help='Assign User')
- attachment_ids = fields.One2many('ir.attachment', 'res_id',
- help='Attachment Line')
+ help='Choose the Category', string='Category')
+ tags = fields.Many2many('helpdesk.tag', help='Choose the Tags',
+ string='Tag')
+ assign_user = fields.Boolean(string='Assigned User', help='Assign User')
+ attachment_ids = fields.One2many('ir.attachment',
+ 'res_id',
+ help='Attachment Line',
+ string='Attachment')
merge_ticket_invisible = fields.Boolean(string='Merge Ticket',
help='Merge Ticket Invisible or '
- 'Not', default=False)
+ 'Not')
merge_count = fields.Integer(string='Merge Count', help='Merged Tickets '
- 'Count')
- active = fields.Boolean(default=True, help='Active', string='Active')
-
+ 'Count')
@api.onchange('team_id', 'team_head')
def team_leader_domain(self):
- """Changing the team leader when selecting the team"""
- li = []
+ """Update the domain for the assigned user based on the selected team.
+
+ This onchange method is triggered when the helpdesk team or team leader
+ is changed. It updates the domain for the assigned user field to include
+ only the members of the selected team."""
+ teams = []
for rec in self.team_id.member_ids:
- li.append(rec.id)
- return {'domain': {'assigned_user': [('id', 'in', li)]}}
+ teams.append(rec.id)
+ return {'domain': {'assigned_user': [('id', 'in', teams)]}}
@api.depends('team_id')
def _compute_team_head(self):
- """Compute the team head function"""
+ """Compute the team head based on the selected team.
+
+ This method is triggered when the helpdesk team is changed. It computes
+ and updates the team head field based on the team's lead.
+ """
self.team_head = self.team_id.team_lead_id.id
@api.onchange('stage_id')
def mail_snd(self):
- """Sending mail to the user function"""
+ """Send an email when the stage of the ticket is changed.
+
+ This onchange method is triggered when the stage of the ticket is
+ changed. It updates the last update date, start date, and end date
+ fields accordingly. If a template is associated with the stage, it
+ sends an email using that template."""
rec_id = self._origin.id
data = self.env['help.ticket'].search([('id', '=', rec_id)])
data.last_update_date = fields.Datetime.now()
@@ -160,11 +204,16 @@ class HelpDeskTicket(models.Model):
mail_template.send_mail(self._origin.id, force_send=True)
def assign_to_teamleader(self):
- """Assigning team leader function"""
+ """Assign the ticket to the team leader and send a notification.
+
+ This function checks if a helpdesk team is selected and assigns the
+ team leader to the ticket. It then sends a notification email to the
+ team leader."""
if self.team_id:
self.team_head = self.team_id.team_lead_id.id
mail_template = self.env.ref(
- 'odoo_website_helpdesk.odoo_website_helpdesk_assign')
+ 'odoo_website_helpdesk.'
+ 'mail_template_odoo_website_helpdesk_assign')
mail_template.sudo().write({
'email_to': self.team_head.email,
'subject': self.name
@@ -174,27 +223,42 @@ class HelpDeskTicket(models.Model):
raise ValidationError("Please choose a Helpdesk Team")
def _default_show_create_task(self):
- """Task creation"""
+ """Get the default value for the 'show_create_task' field.
+
+ This method retrieves the default value for the 'show_create_task'
+ field from the configuration settings."""
return self.env['ir.config_parameter'].sudo().get_param(
'odoo_website_helpdesk.show_create_task')
show_create_task = fields.Boolean(string="Create Task",
default=_default_show_create_task,
- compute='_compute_show_create_task')
+ compute='_compute_show_create_task',
+ help='Determines whether the Create Task'
+ ' button should be shown for this '
+ 'ticket.')
create_task = fields.Boolean(string="Create Task", readonly=False,
- related='team_id.create_task', store=True)
- billable = fields.Boolean(string="Billable", default=False)
+ related='team_id.create_task',
+ store=True,
+ help='Defines if a task should be created when'
+ ' this ticket is created.')
+ billable = fields.Boolean(string="Billable", help='Indicates whether the '
+ 'ticket is billable or '
+ 'not.')
def _default_show_category(self):
- """Show category default"""
+ """Its display the default category"""
return self.env['ir.config_parameter'].sudo().get_param(
'odoo_website_helpdesk.show_category')
show_category = fields.Boolean(default=_default_show_category,
- compute='_compute_show_category')
- customer_rating = fields.Selection(RATING, default='0', readonly=True)
-
- review = fields.Char('Review', readonly=True)
+ compute='_compute_show_category',
+ help='Display the default category')
+ customer_rating = fields.Selection(RATING, default='0', readonly=True,
+ string='Customer Rating',
+ help='Display the customer rating.')
+
+ review = fields.Char(string='Review', readonly=True,
+ help='Customer review of the ticket.')
kanban_state = fields.Selection([
('normal', 'Ready'),
('done', 'In Progress'),
@@ -207,13 +271,14 @@ class HelpDeskTicket(models.Model):
rec.show_category = show_category
def _compute_show_create_task(self):
- """Compute the created task"""
+ """Compute the value of the 'show_create_task' field for each record in
+ the current recordset."""
show_create_task = self._default_show_create_task()
for record in self:
record.show_create_task = show_create_task
def auto_close_ticket(self):
- """Automatically closing the ticket"""
+ """Automatically closing the ticket based on the closing date."""
auto_close = self.env['ir.config_parameter'].sudo().get_param(
'odoo_website_helpdesk.auto_close_ticket')
if auto_close:
@@ -229,39 +294,46 @@ class HelpDeskTicket(models.Model):
rec.stage_id = close_stage_id
def default_stage_id(self):
- # Search your stage
+ """Search your stage"""
return self.env['ticket.stage'].search(
[('name', '=', 'Draft')], limit=1).id
@api.model
def _read_group_stage_ids(self, stages, domain, order):
"""
- return the stages to stage_ids
+ Return the available stages for grouping.
+
+ This static method is used to provide the available stages for
+ grouping when displaying records in a grouped view.
+
"""
stage_ids = self.env['ticket.stage'].search([])
return stage_ids
- @api.model_create_multi
+ @api.model
def create(self, vals_list):
- """Create function"""
- return super(HelpDeskTicket, self).create(vals_list)
-
- def write(self, vals):
- """Write function"""
- result = super(HelpDeskTicket, self).write(vals)
- return result
-
- def create_invoice(self):
- """Create Invoice based on the ticket"""
+ """Create a new helpdesk ticket.
+ This method is called when creating a new helpdesk ticket. It
+ generates a unique name for the ticket using a sequence if no
+ name is provided.
+ """
+ if vals_list.get('name', _('New')) == _('New'):
+ vals_list['name'] = self.env['ir.sequence'].next_by_code(
+ 'help.ticket') or _('New')
+ return super().create(vals_list)
+
+ def action_create_invoice(self):
+ """Create Invoice for Help Desk Ticket.
+ This function creates an invoice for the help desk ticket based on
+ the associated tasks with billed hours.
+ """
tasks = self.env['project.task'].search(
[('project_id', '=', self.project_id.id),
('ticket_id', '=', self.id)]).filtered(
- lambda line: line.ticket_billed == False)
+ lambda line: line.ticket_billed == True)
if not tasks:
raise UserError('No Tasks to Bill')
-
total = sum(x.effective_hours for x in tasks if x.effective_hours > 0)
-
invoice_no = self.env['ir.sequence'].next_by_code(
'ticket.invoice')
self.env['account.move'].create([
@@ -272,14 +344,15 @@ class HelpDeskTicket(models.Model):
'ticket_id': self.id,
'date': fields.Date.today(),
'invoice_date': fields.Date.today(),
- 'invoice_line_ids': [(0, 0,
- {'product_id': self.service_product_id.id,
- 'name': self.service_product_id.name,
- 'quantity': total,
- 'product_uom_id': self.service_product_id.uom_id.id,
- 'price_unit': self.cost,
- 'account_id': self.service_product_id.categ_id.property_account_income_categ_id.id,
- })],
+ 'invoice_line_ids':
+ [(0, 0, {'product_id': self.service_product_id.id,
+ 'name': self.service_product_id.name,
+ 'quantity': total,
+ 'product_uom_id': self.service_product_id.uom_id.id,
+ 'price_unit': self.cost,
+ 'account_id':
+ self.service_product_id.categ_id.property_account_income_categ_id.id,
+ })],
}, ])
for task in tasks:
task.ticket_billed = True
@@ -291,8 +364,11 @@ class HelpDeskTicket(models.Model):
}
}
- def create_tasks(self):
- """Task creation"""
+ def action_create_tasks(self):
+ """Create Task for HelpDesk Ticket
+ This function creates a task associated with the helpdesk ticket
+ and updates the task_ids field.
+ """
task_id = self.env['project.task'].create({
'name': self.name + '-' + self.subject,
'project_id': self.project_id.id,
@@ -302,7 +378,6 @@ class HelpDeskTicket(models.Model):
self.write({
'task_ids': [(4, task_id.id)]
})
-
return {
'name': 'Tasks',
'res_model': 'project.task',
@@ -313,8 +388,8 @@ class HelpDeskTicket(models.Model):
'target': 'new',
}
- def open_tasks(self):
- """View the Created task """
+ def action_open_tasks(self):
+ """Smart Button of Task to view the Tasks of HelpDesk Ticket"""
return {
'name': 'Tasks',
'domain': [('ticket_id', '=', self.id)],
@@ -324,8 +399,8 @@ class HelpDeskTicket(models.Model):
'type': 'ir.actions.act_window',
}
- def open_invoices(self):
- """View the Created invoice"""
+ def action_open_invoices(self):
+ """Smart Button of Invoice to view the Invoices for HelpDesk Ticket"""
return {
'name': 'Invoice',
'domain': [('ticket_id', '=', self.id)],
@@ -335,8 +410,8 @@ class HelpDeskTicket(models.Model):
'type': 'ir.actions.act_window',
}
- def open_merged_tickets(self):
- """Open the merged tickets tree view"""
+ def action_open_merged_tickets(self):
+ """ Smart button of the merged tickets"""
ticket_ids = self.env['support.tickets'].search(
[('merged_ticket', '=', self.id)])
# Get the display_name matching records from the support.tickets
@@ -354,7 +429,10 @@ class HelpDeskTicket(models.Model):
}
def action_send_reply(self):
- """Action to sent reply button"""
+ """Compose and send a reply to the customer.
+ This function opens a window for composing and sending a reply to
+ the customer. It uses the configured email template for replies.
+ """
template_id = self.env['ir.config_parameter'].sudo().get_param(
'odoo_website_helpdesk.reply_template_id'
)
@@ -385,67 +463,3 @@ class HelpDeskTicket(models.Model):
'default_res_id': self.id,
}
}
-
-
-class StageTicket(models.Model):
- """Stage Ticket class"""
- _name = 'ticket.stage'
- _description = 'Ticket Stage'
- _order = 'sequence, id'
- _fold_name = 'fold'
-
- name = fields.Char('Name', help='Name')
- active = fields.Boolean(default=True, help='Active', string='Active')
- sequence = fields.Integer(default=50, help='Sequence', string='Sequence')
- closing_stage = fields.Boolean('Closing Stage', default=False,
- help='Closing stage')
- cancel_stage = fields.Boolean('Cancel Stage', default=False,
- help='Cancel stage')
- starting_stage = fields.Boolean('Start Stage', default=False,
- help='Starting Stage')
- folded = fields.Boolean('Folded in Kanban', default=False,
- help='Folded Stage')
- template_id = fields.Many2one('mail.template',
- help='Templates',
- domain="[('model', '=', 'help.ticket')]")
- group_ids = fields.Many2many('res.groups', help='Group ID')
- fold = fields.Boolean(string='Fold', help='Folded')
-
- def unlink(self):
- """Unlinking Function"""
- for rec in self:
- tickets = rec.search([])
- sequence = tickets.mapped('sequence')
- lowest_sequence = tickets.filtered(
- lambda x: x.sequence == min(sequence))
- if self.name == "Draft":
- raise UserError(_("Cannot Delete This Stage"))
- if rec == lowest_sequence:
- raise UserError(_("Cannot Delete '%s'" % (rec.name)))
- else:
- res = super().unlink()
- return res
-
-
-class HelpdeskTypes(models.Model):
- """Helpdesk types """
- _name = 'helpdesk.types'
- _description = 'Helpdesk Types'
-
- name = fields.Char(string='Type', help='Types')
-
-
-class Tasks(models.Model):
- """Inheriting the task"""
- _inherit = 'project.task'
-
- ticket_billed = fields.Boolean('Billed', default=False,
- help='Billed Tickets')
-
-
-class HelpdeskTags(models.Model):
- """Helpdesk tags"""
- _name = 'helpdesk.tag'
- _description = 'Helpdesk Tags'
-
- name = fields.Char(string='Tag', help='Tag Name')
diff --git a/odoo_website_helpdesk/models/helpdesk_categories.py b/odoo_website_helpdesk/models/helpdesk_categories.py
new file mode 100644
index 000000000..f9b553d63
--- /dev/null
+++ b/odoo_website_helpdesk/models/helpdesk_categories.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class HelpdeskCategories(models.Model):
+ """This class represents the Helpdesk Categories, providing information
+ about different categories that can be assigned to helpdesk items.
+ """
+ _name = 'helpdesk.categories'
+ _description = 'Helpdesk Categories'
+
+ name = fields.Char(string='Name', help='Category Name')
+ sequence = fields.Integer(string='Sequence', default=0,
+ help='Sequence of a Category')
diff --git a/odoo_website_helpdesk/models/categories.py b/odoo_website_helpdesk/models/helpdesk_tag.py
similarity index 73%
rename from odoo_website_helpdesk/models/categories.py
rename to odoo_website_helpdesk/models/helpdesk_tag.py
index 8e7cc98a6..5dc59c085 100644
--- a/odoo_website_helpdesk/models/categories.py
+++ b/odoo_website_helpdesk/models/helpdesk_tag.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -22,10 +22,9 @@
from odoo import fields, models
-class HelpdeskCategories(models.Model):
- """Category Model"""
- _name = 'helpdesk.categories'
- _description = 'Categories'
+class HelpdeskTag(models.Model):
+ """ Its handle to control the helpdesk ticket tags"""
+ _name = 'helpdesk.tag'
+ _description = 'Helpdesk Tag'
- name = fields.Char('Name', help='Category Name')
- sequence = fields.Integer('Sequence', default=0, help='Sequence')
+ name = fields.Char(string='Tag', help='Choose the tags')
diff --git a/odoo_website_helpdesk/models/helpdesk_types.py b/odoo_website_helpdesk/models/helpdesk_types.py
new file mode 100644
index 000000000..be3205d71
--- /dev/null
+++ b/odoo_website_helpdesk/models/helpdesk_types.py
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class HelpdeskTypes(models.Model):
+ """Its handle to control helpdesk ticket types """
+ _name = 'helpdesk.types'
+ _description = 'Helpdesk Types'
+
+ name = fields.Char(string='Type', help='Types helpdesk tickets')
diff --git a/odoo_website_helpdesk/models/mail_compose.py b/odoo_website_helpdesk/models/mail_compose_message.py
similarity index 70%
rename from odoo_website_helpdesk/models/mail_compose.py
rename to odoo_website_helpdesk/models/mail_compose_message.py
index 9840e8282..de16c4861 100644
--- a/odoo_website_helpdesk/models/mail_compose.py
+++ b/odoo_website_helpdesk/models/mail_compose_message.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -23,11 +23,18 @@ from odoo import fields, models
class MailComposeMessage(models.TransientModel):
- """Inheriting the Mail compose message"""
+ """ This class extends the functionality of the 'mail.compose.message'
+ model to include custom behavior for sending emails related to help tickets.
+ """
_inherit = 'mail.compose.message'
def _action_send_mail(self, auto_commit=False):
- """Send mail function"""
+ """Override of the base '_action_send_mail' method to include additional
+ logic when sending emails related to help tickets.
+
+ If the model associated with the mail is 'help.ticket', update the
+ 'replied_date' field of the associated help ticket to the current date.
+ """
if self.model == 'help.ticket':
ticket_id = self.env['help.ticket'].browse(self.res_id)
ticket_id.replied_date = fields.Date.today()
diff --git a/odoo_website_helpdesk/models/merge_tickets.py b/odoo_website_helpdesk/models/merge_tickets.py
index 33d0db7a9..4c9afb47c 100644
--- a/odoo_website_helpdesk/models/merge_tickets.py
+++ b/odoo_website_helpdesk/models/merge_tickets.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -22,37 +22,42 @@
from odoo import api, fields, models
-class MergeTicket(models.Model):
- """Tickets merging class"""
+class MergeTickets(models.Model):
+ """Tickets merging class
+ This class allows users to merge support tickets or create new ones.
+ It provides functionality to consolidate information from multiple tickets.
+ """
_name = 'merge.tickets'
- _description = 'Merging the selected tickets'
+ _description = 'Merge Tickets'
_rec_name = 'support_ticket_id'
user_id = fields.Many2one('res.partner',
string='Responsible User',
help='Responsible user name',
default=lambda self: self.env.user.partner_id.id)
- support_team_id = fields.Many2one('help.team', string='Support Team',
+ support_team_id = fields.Many2one('help.team',
+ string='Support Team',
help='Support Team Name')
- customer_id = fields.Many2one('res.partner', string='Customer',
+ customer_id = fields.Many2one('res.partner',
+ string='Customer',
help='Customer Name'
)
support_ticket_id = fields.Many2one('help.ticket',
string='Support Ticket')
new_ticket = fields.Boolean(string='Create New Ticket ?',
help='Creating new tickets or not.',
- default=False)
+ )
subject = fields.Char(string='Subject', help='Enter the New Ticket Subject')
merge_reason = fields.Char(string='Merge Reason', help='Merging Reason')
support_ticket_ids = fields.One2many('support.tickets',
'support_ticket_id',
string='Support Tickets',
helps='Merged tickets')
- active = fields.Boolean(string='Disable Record', help='Disable Record',
- default=True)
+ active = fields.Boolean(string='Disable Record', help='Disable Record')
def default_get(self, fields_list):
- defaults = super(MergeTicket, self).default_get(fields_list)
+ """It handles to get the default pre-filled the values """
+ defaults = super().default_get(fields_list)
active_ids = self._context.get('active_ids', [])
selected_tickets = self.env['help.ticket'].browse(active_ids)
customer_ids = selected_tickets.mapped('customer_id')
@@ -60,7 +65,8 @@ class MergeTicket(models.Model):
display_names = selected_tickets.mapped('display_name')
helpdesk_team = selected_tickets.mapped('team_id')
descriptions = selected_tickets.mapped('description')
- if len(customer_ids): # Ensure both selected records have the same customer
+ # Ensure both selected records have the same customer
+ if len(customer_ids):
defaults.update({
'customer_id': customer_ids[0].id,
'support_team_id': helpdesk_team,
@@ -80,10 +86,10 @@ class MergeTicket(models.Model):
"""Merging the tickets or creating new tickets"""
if self.new_ticket:
description = "\n\n".join(
- f"{ticket.subject}\n{'-' * len(ticket.subject)}\n{ticket.description}"
+ f"{ticket.subject}\n{'-' * len(ticket.subject)}\n"
+ f"{ticket.description}"
for ticket in self.support_ticket_ids
)
-
self.env['help.ticket'].create({
'subject': self.subject,
'description': description,
@@ -93,10 +99,12 @@ class MergeTicket(models.Model):
else:
if len(self.support_ticket_ids):
description = "\n\n".join(
- f"{ticket.subject}\n{'-' * len(ticket.subject)}\n{ticket.description}"
+ f"{ticket.subject}\n{'-' * len(ticket.subject)}\n"
+ f"{ticket.description}"
for ticket in self.support_ticket_ids
)
- # Update the existing support_ticket with the combined information
+ # Update the existing support_ticket with the combined
+ # Information
self.support_ticket_id.write({
'description': description,
'merge_ticket_invisible': True,
diff --git a/odoo_website_helpdesk/models/project_task.py b/odoo_website_helpdesk/models/project_task.py
new file mode 100644
index 000000000..38e3c4d23
--- /dev/null
+++ b/odoo_website_helpdesk/models/project_task.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class ProjectTask(models.Model):
+ """
+ This class extends the 'project.task' model in Odoo to add a custom field
+ called 'ticket_billed' and 'ticket_id'.
+ ticket_billed: A boolean field indicating whether the ticket has
+ been billed or not.
+ ticket_id : A many2One field to link the task
+ with a help ticket
+ """
+ _inherit = 'project.task'
+
+ ticket_billed = fields.Boolean(string='Billed',
+ help='Whether the Ticket has been Invoiced'
+ 'or Not')
+ ticket_id = fields.Many2one('help.ticket', string='Ticket',
+ help='The help ticket associated with this '
+ 'recordThis field allows you to link '
+ 'this record to an existing help ticket.')
diff --git a/odoo_website_helpdesk/models/res_config.py b/odoo_website_helpdesk/models/res_config.py
deleted file mode 100644
index be0335825..000000000
--- a/odoo_website_helpdesk/models/res_config.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# -*- coding: utf-8 -*-
-#############################################################################
-#
-# Cybrosys Technologies Pvt. Ltd.
-#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
-# Author: Cybrosys Techno Solutions()
-#
-# You can modify it under the terms of the GNU LESSER
-# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
-#
-# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
-# (LGPL v3) along with this program.
-# If not, see .
-#
-#############################################################################
-from odoo import api, fields, models
-
-
-class Menu(models.Model):
- """Inheriting the website menu"""
- _inherit = "website.menu"
-
- def _compute_visible(self):
- """Compute visible"""
- super()._compute_visible()
- show_menu_header = self.env['ir.config_parameter'].sudo().get_param(
- 'odoo_website_helpdesk.helpdesk_menu_show')
- for menu in self:
- if menu.name == 'Helpdesk' and show_menu_header == False:
- menu.is_visible = False
- if menu.name == 'Helpdesk' and show_menu_header == True:
- menu.is_visible = True
-
-
-class Helpdesk(models.TransientModel):
- """Inheriting the res config"""
- _inherit = 'res.config.settings'
-
- show_create_task = fields.Boolean(string="Create Tasks",
- config_parameter='odoo_website_helpdesk.show_create_task',
- help='Create Task')
- show_category = fields.Boolean(string="Category",
- config_parameter='odoo_website_helpdesk.show_category',
- help='Category',
- implied_group='odoo_website_helpdesk.group_show_category')
- product_website = fields.Boolean(string="Product On Website",
- config_parameter='odoo_website_helpdesk.product_website',
- help='Product on website')
- auto_close_ticket = fields.Boolean(string="Auto Close Ticket",
- config_parameter='odoo_website_helpdesk.auto_close_ticket',
- help='Auto Close ticket')
- no_of_days = fields.Integer(string="No Of Days",
- config_parameter='odoo_website_helpdesk.no_of_days',
- help='No of Days')
- closed_stage = fields.Many2one(
- 'ticket.stage', string='Closing stage',
- help='Closing Stage',
- config_parameter='odoo_website_helpdesk.closed_stage')
-
- reply_template_id = fields.Many2one('mail.template',
- domain="[('model', '=', 'help.ticket')]",
- config_parameter='odoo_website_helpdesk.reply_template_id',
- help='Reply Template')
- helpdesk_menu_show = fields.Boolean('Helpdesk Menu',
- config_parameter=
- 'odoo_website_helpdesk.helpdesk_menu_show',
- help='Helpdesk menu')
-
- @api.onchange('closed_stage')
- def closed_stage_a(self):
- """Closing stage function"""
- if self.closed_stage:
- stage = self.closed_stage.id
- in_stage = self.env['ticket.stage'].search([('id', '=', stage)])
- not_in_stage = self.env['ticket.stage'].search([('id', '!=', stage)])
- in_stage.closing_stage = True
- for each in not_in_stage:
- each.closing_stage = False
-
- @api.constrains('show_category')
- def show_category_subcategory(self):
- """Show category and the sub category"""
- if self.show_category:
- group_cat = self.env.ref(
- 'odoo_website_helpdesk.group_show_category')
- group_cat.write({
- 'users': [(4, self.env.user.id)]
- })
- else:
- group_cat = self.env.ref(
- 'odoo_website_helpdesk.group_show_category')
- group_cat.write({
- 'users': [(5, False)]
- })
diff --git a/odoo_website_helpdesk/models/res_config_settings.py b/odoo_website_helpdesk/models/res_config_settings.py
new file mode 100644
index 000000000..0d30e44f4
--- /dev/null
+++ b/odoo_website_helpdesk/models/res_config_settings.py
@@ -0,0 +1,100 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import api, fields, models
+
+
+class ResConfigSettings(models.TransientModel):
+ """This class extends the functionality of the 'res.config.settings' model
+ to provide configuration options for various settings related to the
+ helpdesk module.
+ """
+ _inherit = 'res.config.settings'
+
+ show_create_task = fields.Boolean(
+ string="Create Tasks",
+ config_parameter='odoo_website_helpdesk.show_create_task',
+ help='When enabling this field yu can create a task under the ticket')
+ show_category = fields.Boolean(
+ string="Category",
+ config_parameter='odoo_website_helpdesk.show_category',
+ help='When enabling this its show the category of ticket',
+ implied_group='odoo_website_helpdesk.group_show_category')
+ product_website = fields.Boolean(
+ string="Product On Website",
+ config_parameter='odoo_website_helpdesk.product_website',
+ help='When enabling this feature you can mention the product on website'
+ ' at time of creating the ticketProduct on website')
+ auto_close_ticket = fields.Boolean(
+ string="Auto Close Ticket",
+ config_parameter='odoo_website_helpdesk.auto_close_ticket',
+ help='Automatically Close ticket if the condition is satisfied')
+ no_of_days = fields.Integer(
+ string="No Of Days",
+ config_parameter='odoo_website_helpdesk.no_of_days',
+ help='After this date the ticket will closing automatically ')
+ closed_stage = fields.Many2one(
+ 'ticket.stage', string='Closing stage',
+ help='Closing Stage',
+ config_parameter='odoo_website_helpdesk.closed_stage')
+
+ reply_template_id = fields.Many2one(
+ 'mail.template',
+ string='Relaid ID',
+ domain="[('model', '=', 'help.ticket')]",
+ config_parameter='odoo_website_helpdesk.reply_template_id',
+ help='Reply Template')
+ helpdesk_menu_show = fields.Boolean(
+ string='Helpdesk Menu',
+ config_parameter='odoo_website_helpdesk.helpdesk_menu_show',
+ help='When enabling this option to visible Helpdesk menu in website')
+
+ @api.onchange('closed_stage')
+ def closed_stage_a(self):
+ """This method is triggered when the 'closed_stage' field is changed.
+ It updates the 'closing_stage' attribute of the selected stage and
+ clears it for other stages.
+ """
+ stage = self.closed_stage.id
+ in_stage = self.env['ticket.stage'].search([('id', '=', stage)])
+ not_in_stage = self.env['ticket.stage'].search([('id', '!=', stage)])
+ in_stage.closing_stage = True
+ for each in not_in_stage:
+ each.closing_stage = False
+
+ @api.constrains('show_category')
+ def show_category_subcategory(self):
+ """ This constraint method is triggered when the 'show_category' field
+ is changed. It updates the users in the 'group_show_category' based on
+ the 'show_category' value.
+ """
+ if self.show_category:
+ group_cat = self.env.ref(
+ 'odoo_website_helpdesk.group_show_category')
+ group_cat.write({
+ 'users': [(4, self.env.user.id)]
+ })
+ else:
+ group_cat = self.env.ref(
+ 'odoo_website_helpdesk.group_show_category')
+ group_cat.write({
+ 'users': [(5, False)]
+ })
diff --git a/odoo_website_helpdesk/models/support_tickets.py b/odoo_website_helpdesk/models/support_tickets.py
index 782d16704..5d5460b39 100644
--- a/odoo_website_helpdesk/models/support_tickets.py
+++ b/odoo_website_helpdesk/models/support_tickets.py
@@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies()
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
# Author: Cybrosys Techno Solutions()
#
# You can modify it under the terms of the GNU LESSER
@@ -23,7 +23,7 @@ from odoo import fields, models
class SupportTickets(models.Model):
- """Creating onetoMany model"""
+ """Creating onetoMany model to handle the merging ticket"""
_name = 'support.tickets'
_description = 'Support Tickets'
diff --git a/odoo_website_helpdesk/models/ticket_stage.py b/odoo_website_helpdesk/models/ticket_stage.py
new file mode 100644
index 000000000..30545c33b
--- /dev/null
+++ b/odoo_website_helpdesk/models/ticket_stage.py
@@ -0,0 +1,98 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models, _
+from odoo.exceptions import UserError
+
+
+class TicketStage(models.Model):
+ """This model represents the stages of a helpdesk ticket. A stage is used to
+ indicate the current state of a ticket, such as 'New', 'In Progress',
+ 'Resolved', or 'Closed'. Stages are used to organize and track the
+ progress of tickets throughout their lifecycle."""
+
+ _name = 'ticket.stage'
+ _description = 'Ticket Stage'
+ _order = 'sequence, id'
+ _fold_name = 'fold'
+
+ name = fields.Char(string='Name', help='The name of the stage. This field'
+ ' is used to identify the stage and'
+ ' is displayed in various views '
+ 'and reports.')
+ active = fields.Boolean(default=True,
+ string='Active',
+ help='Whether the stage is active or not. If this '
+ 'field is set to False,the stage will not be '
+ 'displayed in various views and reports.')
+ sequence = fields.Integer(string='Sequence',
+ default=50,
+ help='The sequence number of the stage. This '
+ 'field is used to specify the order in which'
+ ' the stages are displayed in various views '
+ 'and reports.', )
+ closing_stage = fields.Boolean(string='Closing Stage',
+ help='Whether the stage is a closing stage '
+ 'or not. A closing stage is a stage '
+ 'that indicates that the helpdesk '
+ 'ticket has been resolved or closed.'
+ ' This field is used to identify the '
+ 'closing stage and is used in various '
+ 'calculations and reports.')
+ cancel_stage = fields.Boolean(string='Cancel Stage',
+ help='Whether the stage is a cancel stage '
+ 'or not. A cancel stage is a stage that'
+ 'indicate the helpdesk tickets has been '
+ 'cancelled or removed')
+ starting_stage = fields.Boolean(string='Start Stage',
+ help='Starting ticket Stage')
+ folded = fields.Boolean(string='Folded in Kanban',
+ help='Whether the stage is folded in the Kanban '
+ 'view or not. If this field is set to True,'
+ ' the stage will be displayed in a collapsed '
+ 'state in the Kanban view, which can be '
+ 'expanded by clicking on it.This field is '
+ 'used to control the behavior of the '
+ 'Kanban view.')
+ template_id = fields.Many2one('mail.template',
+ string='Template',
+ help='Choose the template',
+ domain="[('model', '=', 'help.ticket')]")
+ group_ids = fields.Many2many('res.groups',
+ string='Group',
+ help='Choose the group ID')
+ fold = fields.Boolean(string='Fold', help='When enabling this the ticket '
+ 'stage will folded on the view')
+
+ def unlink(self):
+ """Deleting the helpdesk tickets from various stage."""
+ for rec in self:
+ tickets = rec.search([])
+ sequence = tickets.mapped('sequence')
+ lowest_sequence = tickets.filtered(
+ lambda x: x.sequence == min(sequence))
+ if self.name == "Draft":
+ raise UserError(_("Cannot Delete This Stage"))
+ if rec == lowest_sequence:
+ raise UserError(_("Cannot Delete '%s'" % (rec.name)))
+ else:
+ res = super().unlink()
+ return res
diff --git a/odoo_website_helpdesk/models/website_menu.py b/odoo_website_helpdesk/models/website_menu.py
new file mode 100644
index 000000000..d0b47a395
--- /dev/null
+++ b/odoo_website_helpdesk/models/website_menu.py
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import models
+
+
+class WebsiteMenu(models.Model):
+ """
+ Inheriting the website menu.
+
+ This class inherits from the 'website.menu' model and extends its
+ functionality to compute the visibility of the menu
+ item based on the value of the 'odoo_website_helpdesk.helpdesk_menu_show'
+ configuration parameter.
+
+ Attributes:
+ _inherit (str): The name of the model being inherited.
+ """
+ _inherit = "website.menu"
+
+ def _compute_visible(self):
+ """
+ Compute the visibility of the menu item.
+
+ This method is used to determine whether the menu item should be
+ visible or hidden based on the value of the
+ 'odoo_website_helpdesk.helpdesk_menu_show' configuration parameter.
+
+ Returns:
+ None
+
+ Side Effects:
+ Sets the 'is_visible' field of the menu item record to True or
+ False accordingly.
+ """
+ super()._compute_visible()
+ show_menu_header = self.env['ir.config_parameter'].sudo().get_param(
+ 'odoo_website_helpdesk.helpdesk_menu_show')
+ for menu in self:
+ if menu.name == 'Helpdesk' and show_menu_header is False:
+ menu.is_visible = False
+ if menu.name == 'Helpdesk' and show_menu_header is True:
+ menu.is_visible = True
diff --git a/odoo_website_helpdesk/report/helpdesk_ticket_report_template.xml b/odoo_website_helpdesk/report/help_ticket_templates.xml
similarity index 98%
rename from odoo_website_helpdesk/report/helpdesk_ticket_report_template.xml
rename to odoo_website_helpdesk/report/help_ticket_templates.xml
index 7b30fa18a..5d01bd1c4 100644
--- a/odoo_website_helpdesk/report/helpdesk_ticket_report_template.xml
+++ b/odoo_website_helpdesk/report/help_ticket_templates.xml
@@ -1,4 +1,5 @@
+
@@ -40,7 +41,7 @@
-
+
@@ -97,6 +98,7 @@
+
Helpdesk Ticket Reporthelp.ticket
diff --git a/odoo_website_helpdesk/security/ir.model.access.csv b/odoo_website_helpdesk/security/ir.model.access.csv
index 2240feae7..1b50406b5 100644
--- a/odoo_website_helpdesk/security/ir.model.access.csv
+++ b/odoo_website_helpdesk/security/ir.model.access.csv
@@ -1,24 +1,17 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-
-access_help_ticket,access.help.ticket,model_help_ticket,,1,1,1,1
-
-access_help_ticket_teams_user,access.help.team,model_help_team,odoo_website_helpdesk.helpdesk_user,1,0,0,0
-access_help_ticket_teams_leader,access.help.team,model_help_team,odoo_website_helpdesk.helpdesk_team_leader,1,0,0,0
-access_help_ticket_teams_manager,access.help.team,model_help_team,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
-
-access_helpdesk_tag_user,access.helpdesk.tag,model_helpdesk_tag,odoo_website_helpdesk.helpdesk_user,1,0,0,0
-access_helpdesk_tag_leader,access.helpdesk.tag,model_helpdesk_tag,odoo_website_helpdesk.helpdesk_team_leader,1,1,1,1
-access_helpdesk_tag_manager,access.helpdesk.tag,model_helpdesk_tag,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
-
-access_help_ticket_stage_user,access.ticket.stage,model_ticket_stage,odoo_website_helpdesk.helpdesk_user,1,1,1,1
-
-access_helpdesk_types_user,access.helpdesk.types,model_helpdesk_types,odoo_website_helpdesk.helpdesk_user,1,0,0,0
-access_helpdesk_types_leader,access.helpdesk.types,model_helpdesk_types,odoo_website_helpdesk.helpdesk_team_leader,1,1,1,1
-access_helpdesk_types_manager,access.helpdesk.types,model_helpdesk_types,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
-
-access_helpdesk_categories_user,access_helpdesk_categories,model_helpdesk_categories,odoo_website_helpdesk.helpdesk_user,1,0,0,0
-access_helpdesk_categories_leader,access_helpdesk_categories,model_helpdesk_categories,odoo_website_helpdesk.helpdesk_team_leader,1,1,1,1
-access_helpdesk_categories_manager,access_helpdesk_categories,model_helpdesk_categories,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
-
-merge_tickets,merge.tickets,model_merge_tickets,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
-support_tickets,support.tickets,model_support_tickets,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
\ No newline at end of file
+access_help_ticket_user,access.help.ticket.user,model_help_ticket,base.group_user,1,1,1,1
+access_help_ticket_teams_user,access.help.team.user,model_help_team,odoo_website_helpdesk.helpdesk_user,1,0,0,0
+access_help_ticket_teams_leader,access.help.team.leader,model_help_team,odoo_website_helpdesk.helpdesk_team_leader,1,0,0,0
+access_help_ticket_teams_manager,access.help.team.manager,model_help_team,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
+access_helpdesk_tag_user,access.helpdesk.tag.user,model_helpdesk_tag,odoo_website_helpdesk.helpdesk_user,1,0,0,0
+access_helpdesk_tag_leader,access.helpdesk.tag.leader,model_helpdesk_tag,odoo_website_helpdesk.helpdesk_team_leader,1,1,1,1
+access_helpdesk_tag_manager,access.helpdesk.tag.manager,model_helpdesk_tag,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
+access_helpdesk_types_user,access.helpdesk.types.user,model_helpdesk_types,odoo_website_helpdesk.helpdesk_user,1,0,0,0
+access_helpdesk_types_leader,access.helpdesk.types.leader,model_helpdesk_types,odoo_website_helpdesk.helpdesk_team_leader,1,1,1,1
+access_helpdesk_types_manager,access.helpdesk.types.manager,model_helpdesk_types,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
+access_helpdesk_categories_user,access.helpdesk.categories.user,model_helpdesk_categories,odoo_website_helpdesk.helpdesk_user,1,0,0,0
+access_helpdesk_categories_leader,access.helpdesk.categories.leader,model_helpdesk_categories,odoo_website_helpdesk.helpdesk_team_leader,1,1,1,1
+access_helpdesk_categories_manager,access.helpdesk.categories.manager,model_helpdesk_categories,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
+merge_tickets_manager,merge.tickets.manager,model_merge_tickets,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
+support_tickets_manager,support.tickets.manager,model_support_tickets,odoo_website_helpdesk.helpdesk_manager,1,1,1,1
+access_help_ticket_stage_user,access.ticket.stage.user,model_ticket_stage,base.group_user,1,1,1,1
diff --git a/odoo_website_helpdesk/security/security_groups.xml b/odoo_website_helpdesk/security/odoo_website_helpdesk_security.xml
similarity index 93%
rename from odoo_website_helpdesk/security/security_groups.xml
rename to odoo_website_helpdesk/security/odoo_website_helpdesk_security.xml
index 778aabafb..01cf87086 100644
--- a/odoo_website_helpdesk/security/security_groups.xml
+++ b/odoo_website_helpdesk/security/odoo_website_helpdesk_security.xml
@@ -1,36 +1,34 @@
+
-
HelpdeskHelpdesk Access Groups20
-
+
User
-
+
Team Leader
-
+
Manager
-
group_show_category
-
group_show_subcategory
-
+
Record Rule for team leader
@@ -43,7 +41,7 @@
-
+
Record Rule for manager
@@ -56,7 +54,7 @@
-
+
Record Rule for user
@@ -69,7 +67,7 @@
-
+
Record Rule stages leader
@@ -82,7 +80,7 @@
-
+
Record Rule stages manager
@@ -95,7 +93,7 @@
-
+
Record Rule stages user
diff --git a/odoo_website_helpdesk/static/description/assets/modules/1.jpg b/odoo_website_helpdesk/static/description/assets/modules/1.jpg
new file mode 100644
index 000000000..291635d04
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/1.jpg differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/2.jpg b/odoo_website_helpdesk/static/description/assets/modules/2.jpg
new file mode 100644
index 000000000..157e5a4d4
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/2.jpg differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/3.png b/odoo_website_helpdesk/static/description/assets/modules/3.png
new file mode 100644
index 000000000..6e487b48c
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/3.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/4.png b/odoo_website_helpdesk/static/description/assets/modules/4.png
new file mode 100644
index 000000000..bd1a82caa
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/4.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/5.jpg b/odoo_website_helpdesk/static/description/assets/modules/5.jpg
new file mode 100755
index 000000000..15892a150
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/5.jpg differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/7.jpg b/odoo_website_helpdesk/static/description/assets/modules/7.jpg
new file mode 100644
index 000000000..483dd03a4
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/7.jpg differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/budget_image.png b/odoo_website_helpdesk/static/description/assets/modules/budget_image.png
deleted file mode 100644
index b50130c7d..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/modules/budget_image.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/credit_image.png b/odoo_website_helpdesk/static/description/assets/modules/credit_image.png
deleted file mode 100644
index 3ad04ecfd..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/modules/credit_image.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/employee_image.png b/odoo_website_helpdesk/static/description/assets/modules/employee_image.png
deleted file mode 100644
index 30ad58232..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/modules/employee_image.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/export_image.png b/odoo_website_helpdesk/static/description/assets/modules/export_image.png
deleted file mode 100644
index 492980ad0..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/modules/export_image.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/gantt_image.png b/odoo_website_helpdesk/static/description/assets/modules/gantt_image.png
deleted file mode 100644
index 1ae7cfe3b..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/modules/gantt_image.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/modules/quotation_image.png b/odoo_website_helpdesk/static/description/assets/modules/quotation_image.png
deleted file mode 100644
index 499b1a72f..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/modules/quotation_image.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot10.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot10.png
deleted file mode 100644
index 670aa7f3d..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot10.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot11.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot11.png
deleted file mode 100644
index cdbf5dcf7..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot11.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot12.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot12.png
deleted file mode 100644
index 1a4b887a5..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot12.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot13.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot13.png
deleted file mode 100644
index 87b7a1b4b..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot13.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot14.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot14.png
deleted file mode 100644
index 1448d4634..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot14.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot15.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot15.png
deleted file mode 100644
index dc5e272ad..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot15.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot16.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot16.png
deleted file mode 100644
index 87994ab36..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot16.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot5.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot5.png
deleted file mode 100644
index 69c0f8f89..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot5.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot6.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot6.png
deleted file mode 100644
index b8404a61b..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot6.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot7.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot7.png
deleted file mode 100644
index 027e25950..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot7.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot8.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot8.png
deleted file mode 100644
index e604a6f22..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot8.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot9.png b/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot9.png
deleted file mode 100644
index 09c26b4c5..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/Screenshot9.png and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/billed.png b/odoo_website_helpdesk/static/description/assets/screenshots/billed.png
new file mode 100644
index 000000000..758d514f8
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/billed.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/catagory.png b/odoo_website_helpdesk/static/description/assets/screenshots/catagory.png
new file mode 100644
index 000000000..af879c398
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/catagory.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/create-new-ticket.png b/odoo_website_helpdesk/static/description/assets/screenshots/create-new-ticket.png
index 435133808..fc412fcc5 100644
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/create-new-ticket.png and b/odoo_website_helpdesk/static/description/assets/screenshots/create-new-ticket.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/enable_billing.png b/odoo_website_helpdesk/static/description/assets/screenshots/enable_billing.png
new file mode 100644
index 000000000..22e01a791
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/enable_billing.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/enable_helpdesk.png b/odoo_website_helpdesk/static/description/assets/screenshots/enable_helpdesk.png
new file mode 100644
index 000000000..e20abb2f3
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/enable_helpdesk.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/enable_settings_task.png b/odoo_website_helpdesk/static/description/assets/screenshots/enable_settings_task.png
new file mode 100644
index 000000000..103a8a831
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/enable_settings_task.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/enable_task.png b/odoo_website_helpdesk/static/description/assets/screenshots/enable_task.png
new file mode 100644
index 000000000..51e812d90
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/enable_task.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/hero.gif b/odoo_website_helpdesk/static/description/assets/screenshots/hero.gif
deleted file mode 100644
index 5afed344c..000000000
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/hero.gif and /dev/null differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/invoice.png b/odoo_website_helpdesk/static/description/assets/screenshots/invoice.png
new file mode 100644
index 000000000..25eebb852
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/invoice.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/kanban_view.png b/odoo_website_helpdesk/static/description/assets/screenshots/kanban_view.png
new file mode 100644
index 000000000..73146add0
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/kanban_view.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/merge-action.png b/odoo_website_helpdesk/static/description/assets/screenshots/merge-action.png
index 126ef1f5a..d1e91f637 100644
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/merge-action.png and b/odoo_website_helpdesk/static/description/assets/screenshots/merge-action.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/model.png b/odoo_website_helpdesk/static/description/assets/screenshots/model.png
new file mode 100644
index 000000000..994363485
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/model.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/open-new-ticket.png b/odoo_website_helpdesk/static/description/assets/screenshots/open-new-ticket.png
index 0b7f61887..908d7bd32 100644
Binary files a/odoo_website_helpdesk/static/description/assets/screenshots/open-new-ticket.png and b/odoo_website_helpdesk/static/description/assets/screenshots/open-new-ticket.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/printing.png b/odoo_website_helpdesk/static/description/assets/screenshots/printing.png
new file mode 100644
index 000000000..647023f7a
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/printing.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/report.png b/odoo_website_helpdesk/static/description/assets/screenshots/report.png
new file mode 100644
index 000000000..a0a91df2f
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/report.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/stages.png b/odoo_website_helpdesk/static/description/assets/screenshots/stages.png
new file mode 100644
index 000000000..51421c8f0
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/stages.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/tags.png b/odoo_website_helpdesk/static/description/assets/screenshots/tags.png
new file mode 100644
index 000000000..2760e2884
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/tags.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/task_creation.png b/odoo_website_helpdesk/static/description/assets/screenshots/task_creation.png
new file mode 100644
index 000000000..47b2c5952
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/task_creation.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/teams.png b/odoo_website_helpdesk/static/description/assets/screenshots/teams.png
new file mode 100644
index 000000000..5a25c2c42
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/teams.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/ticket.png b/odoo_website_helpdesk/static/description/assets/screenshots/ticket.png
new file mode 100644
index 000000000..fb42133f2
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/ticket.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/types.png b/odoo_website_helpdesk/static/description/assets/screenshots/types.png
new file mode 100644
index 000000000..b9c9ca218
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/types.png differ
diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/v16-hero.gif b/odoo_website_helpdesk/static/description/assets/screenshots/v16-hero.gif
new file mode 100644
index 000000000..a49a30854
Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/v16-hero.gif differ
diff --git a/odoo_website_helpdesk/static/description/index.html b/odoo_website_helpdesk/static/description/index.html
index 5439bc0d8..60279452b 100644
--- a/odoo_website_helpdesk/static/description/index.html
+++ b/odoo_website_helpdesk/static/description/index.html
@@ -9,10 +9,6 @@
class="mr-2">
Community
-
- Enterprise
-
Odoo.sh
@@ -20,7 +16,6 @@
-
Website Helpdesk Support Ticket Management
@@ -29,7 +24,7 @@
A Module For Managing Support Tickets
-
@@ -56,7 +51,8 @@
more about this
module
-
+
@@ -71,7 +67,8 @@
features of this
module
-
+
@@ -86,7 +83,8 @@
screenshots for this
module
-
+
@@ -108,9 +106,11 @@
- In the Helpdesk Support App, one can Create Ticket trough website portal and can view their tickets.
- The Internal user can assign th ticket to any team and link to any project if needed and can invoice based on the
- timesheet
+
In the Helpdesk Support App, one can Create Ticket trough website
+ portal and can view their tickets.
+ The Internal user can assign th ticket to any team and link to any
+ project if needed and can invoice based on the
+ timesheet
@@ -144,7 +144,7 @@
- View created tickets from portal
+ View Created Tickets from Portal
@@ -153,7 +153,7 @@
-Create Tasks for the project linked to the Ticket
+Create Tasks for the Project Linked to the Ticket
- Link a project to the Ticket and invoice based on the tasks timesheet
+ Link a Project to the Ticket and Invoice based on the Tasks Timesheet
@@ -170,7 +170,7 @@ Create Tasks for the project linked to the Ticket
- Tickets can be viewed and managed from backend
+ Tickets can be Viewed and Managed from Backend
@@ -179,11 +179,11 @@ Create Tasks for the project linked to the Ticket
- Customise stages or use predefined stages for seeing the status of ticket
+ Customise Stages or Use Predefined Stages for Seeing the Status of Ticket
-
+
@@ -203,111 +203,134 @@ Create Tasks for the project linked to the Ticket
-
- Create Tickets From website,
+ Enable the Helpdesk Menu on the Website.
+
+
+
+ Create Tickets From Website
- Get Confirmation/Success message for ticket creation
+ class="img-thumbnail">
+
+ Get Confirmation/Success Message for Ticket Creation
- View created tickets from portal
+ View Created Tickets from Portal
- View the details of each ticket by hovering over them.
+ View the Details of each Ticket by Hovering Over Them.
- Configure stages for tickets
+ View All Tickets According to Stages in Kanban View.
-
+
+
- View tickets according to stages in kanban view.
+ Create / Configure Helpdesk Teams
- Create Tickets from backend normally
+ Create Tickets from Backend Normally
-
- Enable 'Create Tasks' from configuration settings to create tasks for the project linked to the Ticket
+ Enable 'Create Tasks' from Configuration Settings to create
+ Tasks for the Project Linked to the Ticket
-
- Turn on 'create task' toggle inside the ticket form to link a project to the Ticket
+ Turn on 'Create Task' Toggle Inside the Ticket form to Link a
+ Project to the Ticket
-
- Create Tasks:
+
+
+ CREATE TASK:
-
- Turn on 'Billable' toggle inside the ticket form to create invoice based on the tasks timesheet
+ Turn on 'Billable' toggle inside the ticket form to 'CREATE
+ INVOICE' based on the tasks timesheet
-
- Create invoice:
+
+
+ CREATE INVOICE:
+
+
+
+ CONFIRM INVOICE:
-
- Print PDF Report of the Ticket from backend
+ Print PDF Report of the Ticket from backend
-
-
-
Ticket (pdf):
-
@@ -338,7 +361,7 @@ Create Tasks for the project linked to the Ticket
class="img-thumbnail">
-
+
New Ticket.
@@ -351,109 +374,76 @@ Create Tasks for the project linked to the Ticket
-