diff --git a/odoo_website_helpdesk/README.rst b/odoo_website_helpdesk/README.rst new file mode 100644 index 000000000..425c5fc25 --- /dev/null +++ b/odoo_website_helpdesk/README.rst @@ -0,0 +1,45 @@ +.. 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 + +Website Helpdesk Support Ticket Management +========================================== +- HelpDesk Support for Odoo 18 community edition + +Installation +============ +- www.odoo.com/documentation/18.0/setup/install.html +- Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/18.0/legal/licenses/licenses.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V18) Bhagyadev KP, +* Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +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 new file mode 100644 index 000000000..91b93f2f6 --- /dev/null +++ b/odoo_website_helpdesk/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 controller +from . import models diff --git a/odoo_website_helpdesk/__manifest__.py b/odoo_website_helpdesk/__manifest__.py new file mode 100644 index 000000000..025df823b --- /dev/null +++ b/odoo_website_helpdesk/__manifest__.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 . +# +################################################################################ +{ + 'name': "Website Helpdesk Support Ticket Management", + 'version': '18.0.1.0.0', + 'category': 'Website', + 'summary': """The website allows for the creation of tickets, which can + then be controlled from the backend.""", + 'description': """A ticket can be created from the website and subsequently + managed from the backend. Additionally, a bill can be generated for the + ticket, which includes the service cost.""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", + 'depends': ['website', 'project', 'sale_project', 'hr_timesheet', + 'mail', 'contacts'], + 'data': [ + 'security/odoo_website_helpdesk_groups.xml', + 'security/odoo_website_helpdesk_security.xml', + 'security/ir.model.access.csv', + 'data/helpdesk_category_data.xml', + 'data/helpdesk_replay_template_data.xml', + 'data/helpdesk_type_data.xml', + 'data/ir_cron_data.xml', + 'data/ir_sequence_data.xml', + 'data/mail_template_data.xml', + 'data/ticket_stage_data.xml', + 'views/helpdesk_category_views.xml', + 'views/helpdesk_tag_views.xml', + 'views/helpdesk_type_views.xml', + 'views/merge_ticket_views.xml', + 'views/odoo_website_helpdesk_portal_templates.xml', + 'views/portal_templates.xml', + 'views/rating_form.xml', + 'report/helpdesk_ticket_report_template.xml', + 'views/res_config_settings_views.xml', + 'views/team_helpdesk_views.xml', + 'views/ticket_helpdesk_views.xml', + 'views/ticket_stage_views.xml', + 'views/website_form.xml', + 'views/helpdesk_menu_views.xml', + ], + 'assets': { + '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/multiple_product_choose.js', + ] + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/odoo_website_helpdesk/controller/__init__.py b/odoo_website_helpdesk/controller/__init__.py new file mode 100644 index 000000000..a45781185 --- /dev/null +++ b/odoo_website_helpdesk/controller/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 odoo_website_helpdesk +from . import portal +from . import ticket_group_by +from . import ticket_search +from . import website_form +from . import website_ticket diff --git a/odoo_website_helpdesk/controller/odoo_website_helpdesk.py b/odoo_website_helpdesk/controller/odoo_website_helpdesk.py new file mode 100644 index 000000000..17a99a560 --- /dev/null +++ b/odoo_website_helpdesk/controller/odoo_website_helpdesk.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 + + +class HelpDeskDashboard(http.Controller): + """Controller for handling Help Desk dashboard requests.""" + + @http.route(['/helpdesk_dashboard'], type='json', auth="public") + def helpdesk_dashboard(self): + """Retrieves statistics for tickets in different stages. + Returns:dict: Dashboard statistics including counts and IDs for each + stage. + """ + stage_names = ['Inbox', 'Draft', 'In Progress', 'Canceled', 'Done', + 'Closed'] + stage_ids = { + name: request.env['ticket.stage'].search([('name', '=', name)], + limit=1).id for name in + stage_names} + new_stages = [stage_ids['Inbox'], stage_ids['Draft']] + def get_ticket_data(stage_ids): + tickets = request.env["ticket.helpdesk"].search( + [('stage_id', 'in', stage_ids)]) + return len(tickets), [ticket.id for ticket in tickets] + dashboard_values = { + 'new': (get_ticket_data(new_stages))[0], + 'new_id': (get_ticket_data(new_stages))[1], + 'in_progress': (get_ticket_data([stage_ids['In Progress']]))[0], + 'in_progress_id': (get_ticket_data([stage_ids['In Progress']]))[1], + 'canceled': (get_ticket_data([stage_ids['Canceled']]))[0], + 'canceled_id': (get_ticket_data([stage_ids['Canceled']]))[1], + 'done': (get_ticket_data([stage_ids['Done']]))[0], + 'done_id': (get_ticket_data([stage_ids['Done']]))[1], + 'closed': (get_ticket_data([stage_ids['Closed']]))[0], + 'closed_id': (get_ticket_data([stage_ids['Closed']]))[1]} + return dashboard_values + + def helpdesk_dashboard_week(self): + """ Retrieves statistics for tickets created in the past week. + Returns: + dict: Dashboard statistics including counts and IDs for each stage.""" + today = DT.date.today() + week_ago = str(today - DT.timedelta(days=7)) + ' ' + stage_names = ['Inbox', 'Draft', 'In Progress', 'Canceled', 'Done', + 'Closed'] + stages = { + name: request.env['ticket.stage'].search([('name', '=', name)], + limit=1).id for name in + stage_names} + stage_ids = [stages['Inbox'], stages['Draft']] + def get_ticket_data(stage_id): + count = request.env["ticket.helpdesk"].search_count( + [('stage_id', '=', stage_id), ('create_date', '>', week_ago)]) + ids = request.env["ticket.helpdesk"].search( + [('stage_id', '=', stage_id), + ('create_date', '>', week_ago)]).ids + return count, ids + new_count, new_ids = get_ticket_data(stage_ids) + in_progress_count, in_progress_ids = get_ticket_data( + stages['In Progress']) + canceled_count, canceled_ids = get_ticket_data(stages['Canceled']) + done_count, done_ids = get_ticket_data(stages['Done']) + closed_count, closed_ids = get_ticket_data(stages['Closed']) + dashboard_values = { + 'new': new_count, + 'in_progress': in_progress_count, + 'canceled': canceled_count, + 'done': done_count, + 'closed': closed_count, + 'new_id': new_ids, + 'in_progress_id': in_progress_ids, + 'canceled_id': canceled_ids, + 'done_id': done_ids, + 'closed_id': closed_ids, + } + return dashboard_values + + @http.route(['/helpdesk_dashboard_month'], type='json', auth="public") + def helpdesk_dashboard_month(self): + """Retrieves statistics for tickets created in the past month. + Returns: + dict: Dashboard statistics including counts and IDs for each stage.""" + today = DT.date.today() + month_ago = today - DT.timedelta(days=30) + week_ago = str(month_ago) + ' ' + stages = request.env['ticket.stage'].search([('name', 'in', + ['Inbox', 'Draft', + 'In Progress', + 'Canceled', 'Done', + 'Closed'])]) + stage_ids = {stage.name: stage.id for stage in stages} + def get_stage_data(stage_names): + stage_ids_list = [stage_ids[name] for name in stage_names] + tickets = request.env["ticket.helpdesk"].search( + [('stage_id', 'in', stage_ids_list), + ('create_date', '>', week_ago)]) + return len(tickets), [ticket.id for ticket in tickets] + new_count, new_ids = get_stage_data(['Inbox', 'Draft']) + in_progress_count, in_progress_ids = get_stage_data(['In Progress']) + canceled_count, canceled_ids = get_stage_data(['Canceled']) + done_count, done_ids = get_stage_data(['Done']) + closed_count, closed_ids = get_stage_data(['Closed']) + dashboard_values = { + 'new': new_count, + 'in_progress': in_progress_count, + 'canceled': canceled_count, + 'done': done_count, + 'closed': closed_count, + 'new_id': new_ids, + 'in_progress_id': in_progress_ids, + 'canceled_id': canceled_ids, + 'done_id': done_ids, + 'closed_id': closed_ids, + } + return dashboard_values + + @http.route(['/helpdesk_dashboard_year'], type='json', auth="public") + def helpdesk_dashboard_year(self): + """Retrieves statistics for tickets created in the past year. + Returns: + dict: Dashboard statistics including counts and IDs for each stage. + """ + today = DT.date.today() + year_ago = today - DT.timedelta(days=360) + stages = ['Inbox', 'Draft', 'In Progress', 'Canceled', 'Done', 'Closed'] + stage_ids = { + stage: request.env['ticket.stage'].search([('name', '=', stage)], + limit=1).id for stage in + stages} + def get_ticket_data(stage_name): + stage_id = stage_ids[stage_name] + tickets = request.env["ticket.helpdesk"].search( + [('stage_id', '=', stage_id), ('create_date', '>', year_ago)]) + return len(tickets), [ticket.id for ticket in tickets] + dashboard_values = {} + for stage in stages: + count, ids = get_ticket_data(stage) + dashboard_values[stage.lower()] = count + dashboard_values[f'{stage.lower()}_id'] = ids + return dashboard_values diff --git a/odoo_website_helpdesk/controller/portal.py b/odoo_website_helpdesk/controller/portal.py new file mode 100644 index 000000000..d7b150250 --- /dev/null +++ b/odoo_website_helpdesk/controller/portal.py @@ -0,0 +1,111 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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.addons.portal.controllers import portal +from odoo.http import request + + +class TicketPortal(portal.CustomerPortal): + + def _prepare_home_portal_values(self, counters): + """ + Prepare values for the home portal, including ticket count. Args: + counters (dict): A dictionary containing counters for various portal + information. Returns: dict: A dictionary of values for the home portal. + """ + values = super()._prepare_home_portal_values(counters) + if 'ticket_count' in counters: + ticket_count = request.env['ticket.helpdesk'].search_count( + self._get_tickets_domain()) if request.env[ + 'ticket.helpdesk'].check_access_rights( + 'read', raise_exception=False) else 0 + values['ticket_count'] = ticket_count + return values + + def _get_tickets_domain(self): + """ + Define the domain for searching tickets related to the current customer. + Returns: + list: A list representing the domain for ticket search. + """ + return [('customer_id', '=', request.env.user.partner_id.id)] + + @http.route(['/my/tickets'], type='http', auth="user", website=True) + def portal_my_tickets(self): + """ + Route to display the tickets associated with the current customer. + Returns: + http.Response: The HTTP response rendering the tickets page. + """ + domain = self._get_tickets_domain() + tickets = request.env['ticket.helpdesk'].sudo().search(domain) + values = { + 'default_url': "/my/tickets", + 'tickets': tickets, + 'page_name': 'ticket', + } + return request.render("odoo_website_helpdesk.portal_my_tickets", + values) + + @http.route(['/my/tickets/'], type='http', auth="public", + website=True) + def portal_tickets_details(self, **kwargs): + """ + Route to display the details of a specific ticket. + Args: + ticket_id (int): The ID of the ticket to be displayed. + Returns: + http.Response: The HTTP response rendering the ticket details page. + """ + ticket_id = kwargs.get("id") + details = request.env['ticket.helpdesk'].sudo().browse(ticket_id) + data = { + 'page_name': 'ticket', + 'ticket': True, + 'details': details, + } + return request.render("odoo_website_helpdesk.portal_ticket_details", + data) + + @http.route('/my/tickets/download/', auth='public', + type='http', + website=True) + def ticket_download_portal(self, **kwargs): + """ + Route to download a PDF version of a specific ticket. + Args: + ticket (str): The ID of the ticket to be downloaded. + Returns: + http.Response: The HTTP response with the PDF file for download. + """ + ticket_id = int(kwargs.get('id')) + data = { + 'help': request.env['ticket.helpdesk'].sudo().browse(ticket_id)} + report = request.env.ref( + 'odoo_website_helpdesk.report_ticket') + pdf, _ = report.sudo()._render_qweb_pdf( + report, res_ids=ticket_id, data=data) + pdf_http_headers = [('Content-Type', 'application/pdf'), + ('Content-Length', len(pdf)), + ('Content-Disposition', + 'attachment; filename="Helpdesk Ticket.pdf"')] + return request.make_response(pdf, headers=pdf_http_headers) diff --git a/odoo_website_helpdesk/controller/ticket_group_by.py b/odoo_website_helpdesk/controller/ticket_group_by.py new file mode 100644 index 000000000..a3a968bd4 --- /dev/null +++ b/odoo_website_helpdesk/controller/ticket_group_by.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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): + """Controller for handling ticket grouping based on different criteria.""" + + @http.route(['/ticketgroupby'], type='json', auth="public", website=True) + def ticket_group_by(self, **kwargs): + """grouping tickets based on user-defined criteria. + Args: + - kwargs (dict): Keyword arguments received from the HTTP request. + Returns: + - http.Response: Rendered HTTP response containing grouped ticket information. + """ + context = [] + group_value = kwargs.get("search_value") + if group_value == '0': + context = [] + tickets = request.env["ticket.helpdesk"].search( + [('user_id', '=', request.env.user.id)]) + if tickets: + context.append({ + 'name': '', + 'data': tickets + }) + if group_value == '1': + context = [] + stage_ids = request.env['ticket.stage'].search([]) + for stage in stage_ids: + ticket_ids = request.env['ticket.helpdesk'].search([ + ('stage_id', '=', stage.id), + ('user_id', '=', request.env.user.id) + ]) + if ticket_ids: + context.append({ + 'name': stage.name, + 'data': ticket_ids + }) + if group_value == '2': + context = [] + type_ids = request.env['helpdesk.type'].search([]) + for types in type_ids: + ticket_ids_1 = request.env['ticket.helpdesk'].search([ + ('ticket_type_id', '=', types.id), + ('user_id', '=', request.env.user.id) + ]) + if ticket_ids_1: + context.append({ + 'name': types.name, + 'data': ticket_ids_1 + }) + values = { + 'tickets': context, + } + response = http.Response( + template='odoo_website_helpdesk.ticket_group_by_table', + qcontext=values) + return response.render() diff --git a/odoo_website_helpdesk/controller/ticket_search.py b/odoo_website_helpdesk/controller/ticket_search.py new file mode 100644 index 000000000..12a7a6195 --- /dev/null +++ b/odoo_website_helpdesk/controller/ticket_search.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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): + @http.route(['/ticketsearch'], type='json', auth="public", website=True) + def ticket_search(self, **kwargs): + """ + Search for tickets based on the provided search value. + :param search_value: The value to search for in the ticket name or subject. + :type search_value: str + :return: A JSON response containing the matching tickets. + :rtype: http.Response + """ + search_value = kwargs.get("search_value") + tickets = request.env["ticket.helpdesk"].search( + ['|', ('name', 'ilike', search_value), + ('subject', 'ilike', search_value)]) + values = { + 'tickets': tickets, + } + response = http.Response(template='odoo_website_helpdesk.ticket_table', + qcontext=values) + return response.render() diff --git a/odoo_website_helpdesk/controller/website_form.py b/odoo_website_helpdesk/controller/website_form.py new file mode 100644 index 000000000..6a53e8fc9 --- /dev/null +++ b/odoo_website_helpdesk/controller/website_form.py @@ -0,0 +1,151 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 base64 +import json +from psycopg2 import IntegrityError +from odoo import http, _ +from odoo.http import request +from odoo.exceptions import ValidationError +from odoo.addons.website.controllers.form import WebsiteForm + + +class HelpdeskProduct(http.Controller): + """ Controller for handling helpdesk products. + """ + + @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 + + +class WebsiteFormInherit(WebsiteForm): + + def _handle_website_form(self, model_name, **kwargs): + """ + Handle the submission of website forms. + :param model_name: The name of the model associated with the form. + :type model_name: str + :param kwargs: Keyword arguments containing form data. + :type kwargs: dict + :return: JSON response indicating the success or failure of form submission. + :rtype: str + """ + customer = request.env.user.partner_id + lowest_stage_id = None + if model_name == 'ticket.helpdesk': + tickets = request.env['ticket.stage'].sudo().search([]) + if tickets: + sequence = tickets.mapped('sequence') + lowest_sequence = tickets.filtered( + lambda x: x.sequence == min(sequence)) + if lowest_sequence: + lowest_stage_id = lowest_sequence[0] + if lowest_stage_id is None: + return json.dumps( + {'error': "No stage found with the lowest sequence."}) + products = kwargs.get('product') + if products: + split_product = products.split(',') + product_list = [int(i) for i in split_product] + rec_val = { + 'customer_name': kwargs.get('customer_name'), + 'subject': kwargs.get('subject'), + 'description': kwargs.get('description'), + 'email': kwargs.get('email_from'), + 'phone': kwargs.get('phone'), + 'priority': kwargs.get('priority'), + 'product_ids': product_list, + 'stage_id': lowest_stage_id.id, + 'customer_id': customer.id, + 'ticket_type_id': kwargs.get('ticket_type_id'), + 'category_id': kwargs.get('category'), + } + else: + rec_val = { + 'customer_name': kwargs.get('customer_name'), + 'subject': kwargs.get('subject'), + 'description': kwargs.get('description'), + 'email': kwargs.get('email_from'), + 'phone': kwargs.get('phone'), + 'priority': kwargs.get('priority'), + 'stage_id': lowest_stage_id.id, + 'customer_id': customer.id, + 'ticket_type_id': kwargs.get('ticket_type_id'), + 'category_id': kwargs.get('category'), + } + ticket_id = request.env['ticket.helpdesk'].sudo().create(rec_val) + request.session['ticket_number'] = ticket_id.name + request.session['ticket_id'] = ticket_id.id + model_record = request.env['ir.model'].sudo().search( + [('model', '=', model_name)]) + attachments = [] + attachment_index = 0 + while f"ticket_attachment[0][{attachment_index}]" in kwargs: + attachment_key = f"ticket_attachment[0][{attachment_index}]" + if attachment_key in kwargs: + attachment = kwargs[attachment_key] + attachments.append(attachment) + attachment_index += 1 + for attachment in attachments: + attached_file = attachment.read() + request.env['ir.attachment'].sudo().create({ + 'name': attachment.filename, + 'res_model': 'ticket.helpdesk', + 'res_id': ticket_id.id, + 'type': 'binary', + 'datas': base64.encodebytes(attached_file), + }) + request.session['form_builder_model_model'] = model_record.model + request.session['form_builder_model'] = model_record.name + request.session['form_builder_id'] = ticket_id.id + return json.dumps({'id': ticket_id.id}) + else: + model_record = request.env['ir.model'].sudo().search( + [('model', '=', model_name)]) + if not model_record: + return json.dumps( + {'error': _("The form's specified model does not exist")}) + try: + data = self.extract_data(model_record, request.params) + except ValidationError as e: + return json.dumps({'error_fields': e.args[0]}) + try: + id_record = self.insert_record(request, model_record, + data['record'], data['custom'], + data.get('meta')) + if id_record: + self.insert_attachment(model_record, id_record, + data['attachments']) + if model_name == 'mail.mail': + request.env[model_name].sudo().browse(id_record).send() + 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/controller/website_ticket.py b/odoo_website_helpdesk/controller/website_ticket.py new file mode 100644 index 000000000..4065b86f0 --- /dev/null +++ b/odoo_website_helpdesk/controller/website_ticket.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 WebsiteDesk(http.Controller): + @http.route(['/helpdesk_ticket'], type='http', auth="public", website=True, + sitemap=True) + def helpdesk_ticket(self, **kwargs): + """ + Route to display the helpdesk ticket creation form. + Returns: + http.Response: The HTTP response rendering the helpdesk ticket form. + """ + types = request.env['helpdesk.type'].sudo().search([]) + categories = request.env['helpdesk.category'].sudo().search([]) + product = request.env['product.template'].sudo().search([]) + values = {} + values.update({ + 'types': types, + 'categories': categories, + 'product_website': product + }) + return request.render('odoo_website_helpdesk.ticket_form', values) + + @http.route(['/rating/'], type='http', auth="public", + website=True, + sitemap=True) + def rating(self, ticket_id): + """ + Route to display the rating form for a specific ticket. Args: + ticket_id (int): The ID of the ticket for which the rating form is + displayed. Returns: http.Response: The HTTP response rendering the + rating form. + """ + ticket = request.env['ticket.helpdesk'].browse(ticket_id) + data = { + 'ticket': ticket.id, + } + return request.render('odoo_website_helpdesk.rating_form', data) + + @http.route(['/rating//submit'], type='http', auth="user", + website=True, csrf=False, + sitemap=True) + def rating_backend(self, ticket_id, **post): + """ + Customer Rating + """ + ticket = request.env['ticket.helpdesk'].browse(ticket_id) + ticket.write({ + 'customer_rating': post['rating'], + 'review': post['message'], + }) + return request.render('odoo_website_helpdesk.rating_thanks') diff --git a/odoo_website_helpdesk/data/helpdesk_category_data.xml b/odoo_website_helpdesk/data/helpdesk_category_data.xml new file mode 100644 index 000000000..9d45f79b4 --- /dev/null +++ b/odoo_website_helpdesk/data/helpdesk_category_data.xml @@ -0,0 +1,13 @@ + + + + + + Internal + + + + Technical + + + diff --git a/odoo_website_helpdesk/data/helpdesk_replay_template_data.xml b/odoo_website_helpdesk/data/helpdesk_replay_template_data.xml new file mode 100644 index 000000000..fa2d7ca56 --- /dev/null +++ b/odoo_website_helpdesk/data/helpdesk_replay_template_data.xml @@ -0,0 +1,55 @@ + + + + + Helpdesk Reply Email Template + + + {{ object.name }} Replay + +
+

Helpdesk Replay

+
message........
+ +
+ View Ticket + +
+ + + + + + + + + + + + + + + +
Name + + + + username + +
Team name + + + + Team name +
Replied On + + +
+
+
+
+
diff --git a/odoo_website_helpdesk/data/helpdesk_type_data.xml b/odoo_website_helpdesk/data/helpdesk_type_data.xml new file mode 100644 index 000000000..8a8142416 --- /dev/null +++ b/odoo_website_helpdesk/data/helpdesk_type_data.xml @@ -0,0 +1,21 @@ + + + + + + Question + + + + Issue + + + + Repair + + + + Maintenance + + + 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..f05189555 --- /dev/null +++ b/odoo_website_helpdesk/data/ir_cron_data.xml @@ -0,0 +1,15 @@ + + + + + + Auto Close Ticket + + code + model.auto_close_ticket() + + 1 + days + + + diff --git a/odoo_website_helpdesk/data/ir_sequence_data.xml b/odoo_website_helpdesk/data/ir_sequence_data.xml new file mode 100644 index 000000000..8dd4772d8 --- /dev/null +++ b/odoo_website_helpdesk/data/ir_sequence_data.xml @@ -0,0 +1,23 @@ + + + + + + Helpdesk + ticket.helpdesk + TKT + 5 + + + + + + Helpdesk Invoice + ticket.invoice + INV/TKT/%(year)s/ + 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..66236e8eb --- /dev/null +++ b/odoo_website_helpdesk/data/mail_template_data.xml @@ -0,0 +1,213 @@ + + + + + + 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. +

+ +
+
+ + + Reopened Ticket + + + {{object.customer_id.email}} + Ticket Reopened + +

+ Dear + +
+ Your Ticket + + is Reopened +
+
+ Thanks. +

+
+
+ + + Approve Ticket + + + {{object.customer_id.email}} + Ticket Solved + +

+ Dear + +
+ i think your Problem is Solved. + Your Ticket + + is Done +
+
+ Thanks. +

+
+
+ + + + Cancel Ticket + + + {{object.customer_id.email}} + Ticket Canceled + +

+ Dear + +
+ Your Ticket + + is Canceled Due to Some Reasons +
+
+ Thanks. +

+
+
+ + + + + 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

+
+
+
+
+
diff --git a/odoo_website_helpdesk/data/ticket_stage_data.xml b/odoo_website_helpdesk/data/ticket_stage_data.xml new file mode 100644 index 000000000..43ccbd24e --- /dev/null +++ b/odoo_website_helpdesk/data/ticket_stage_data.xml @@ -0,0 +1,39 @@ + + + + + + + 10 + Inbox + + + + 15 + Draft + + + + 25 + Done + + + + 20 + + In Progress + + + + 30 + True + Closed + + + + 35 + True + Canceled + + + \ No newline at end of file diff --git a/odoo_website_helpdesk/doc/RELEASE_NOTES.md b/odoo_website_helpdesk/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..f59fc806d --- /dev/null +++ b/odoo_website_helpdesk/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 30.10.2024 +#### Version 18.0.1.0.0 +#### ADD + +- Initial commit for Website Helpdesk Support Ticket Management diff --git a/odoo_website_helpdesk/models/__init__.py b/odoo_website_helpdesk/models/__init__.py new file mode 100644 index 000000000..ed5cef70b --- /dev/null +++ b/odoo_website_helpdesk/models/__init__.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 account_move +from . import helpdesk_category +from . import helpdesk_tag +from . import helpdesk_type +from . import mail_compose_message +from . import merge_ticket +from . import project_task +from . import res_config_settings +from . import support_ticket +from . import team_helpdesk +from . import ticket_helpdesk +from . import ticket_stage +from . import website_menu diff --git a/odoo_website_helpdesk/models/account_move.py b/odoo_website_helpdesk/models/account_move.py new file mode 100644 index 000000000..bb22cd759 --- /dev/null +++ b/odoo_website_helpdesk/models/account_move.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 AccountMove(models.Model): + """Inheriting the account.move model""" + _inherit = 'account.move' + + ticket_id = fields.Many2one('ticket.helpdesk', + string='Ticket', help='ID of the ticket.') diff --git a/odoo_website_helpdesk/models/helpdesk_category.py b/odoo_website_helpdesk/models/helpdesk_category.py new file mode 100644 index 000000000..30d314ebe --- /dev/null +++ b/odoo_website_helpdesk/models/helpdesk_category.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 HelpdeskCategory(models.Model): + """Category Model""" + _name = 'helpdesk.category' + _description = 'Categories' + + name = fields.Char('Name', help='Category name of the helpdesk') + sequence = fields.Integer('Sequence', default=0, + help='Sequence of the helpdesk category') diff --git a/odoo_website_helpdesk/models/helpdesk_tag.py b/odoo_website_helpdesk/models/helpdesk_tag.py new file mode 100644 index 000000000..4252223f6 --- /dev/null +++ b/odoo_website_helpdesk/models/helpdesk_tag.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 HelpdeskTag(models.Model): + """Helpdesk tags""" + _name = 'helpdesk.tag' + _description = 'Helpdesk Tags' + + name = fields.Char(string='Tag', help='Tag name of the helpdesk.') diff --git a/odoo_website_helpdesk/models/helpdesk_type.py b/odoo_website_helpdesk/models/helpdesk_type.py new file mode 100644 index 000000000..f42fc2039 --- /dev/null +++ b/odoo_website_helpdesk/models/helpdesk_type.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 HelpdeskType(models.Model): + """Helpdesk type """ + _name = 'helpdesk.type' + _description = 'Helpdesk Type' + + name = fields.Char(string='Type', help='Types of help desk.') diff --git a/odoo_website_helpdesk/models/mail_compose_message.py b/odoo_website_helpdesk/models/mail_compose_message.py new file mode 100644 index 000000000..7159622e1 --- /dev/null +++ b/odoo_website_helpdesk/models/mail_compose_message.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 MailComposeMessage(models.TransientModel): + """Inheriting the Mail compose message""" + _inherit = 'mail.compose.message' + + def _action_send_mail(self, auto_commit=False): + """Send mail function""" + if self.model == 'ticket.helpdesk': + try: + res_ids_list = eval(self.res_ids) + if not isinstance(res_ids_list, list): + raise ValueError("Invalid format for res_ids") + except Exception as e: + raise ValueError( + "Error converting res_ids to list: {}".format(e)) + ticket_ids = self.env['ticket.helpdesk'].browse(res_ids_list) + ticket_ids.replied_date = fields.Date.today() + return super(MailComposeMessage, self)._action_send_mail( + auto_commit=auto_commit) diff --git a/odoo_website_helpdesk/models/merge_ticket.py b/odoo_website_helpdesk/models/merge_ticket.py new file mode 100644 index 000000000..ff37be365 --- /dev/null +++ b/odoo_website_helpdesk/models/merge_ticket.py @@ -0,0 +1,111 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 MergeTicket(models.Model): + """Tickets merging class""" + _name = 'merge.ticket' + _description = 'Merging the selected tickets' + _rec_name = 'support_ticket_id' + + user_id = fields.Many2one('res.partner', + string='Responsible User', + help='User name of responsible person.', + default=lambda self: self.env.user.partner_id.id) + support_team_id = fields.Many2one('team.helpdesk', + string='Support Team', + help='Name of the support team.') + customer_id = fields.Many2one('res.partner', string='Customer', + help='Name of the Customer ') + support_ticket_id = fields.Many2one('ticket.helpdesk', + string='Support Ticket', + help="Name of the 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='Reason for Merging the tickets. ') + support_ticket_ids = fields.One2many('support.ticket', + 'support_ticket_id', + string='Support Tickets', + help='Merged tickets') + active = fields.Boolean(string='Disable Record', help='Disable Record', + default=True) + + def default_get(self, fields_list): + """Override the default_get method to provide default values for fields + when creating a new record.""" + defaults = super(MergeTicket, self).default_get(fields_list) + active_ids = self._context.get('active_ids', []) + selected_tickets = self.env['ticket.helpdesk'].browse(active_ids) + customer_ids = selected_tickets.mapped('customer_id') + subjects = selected_tickets.mapped('subject') + display_names = selected_tickets.mapped('display_name') + helpdesk_team = selected_tickets.mapped('team_id') + descriptions = selected_tickets.mapped('description') + if len(customer_ids): + defaults.update({ + 'customer_id': customer_ids[0].id, + 'support_team_id': helpdesk_team, + 'support_ticket_ids': [(0, 0, { + 'subject': subject, + 'display_name': display_name, + 'description': description, + }) for subject, display_name, description in + zip(subjects, display_names, + descriptions)] + }) + return defaults + + def action_merge_ticket(self): + """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}" + for ticket in self.support_ticket_ids + ) + self.env['ticket.helpdesk'].create({ + 'subject': self.subject, + 'description': description, + 'customer_id': self.customer_id.id, + 'team_id': self.support_team_id.id, + }) + else: + if len(self.support_ticket_ids): + description = "\n\n".join( + f"{ticket.subject}\n{'-' * len(ticket.subject)}\n{ticket.description}" + for ticket in self.support_ticket_ids + ) + self.support_ticket_id.write({ + 'description': description, + 'merge_ticket_invisible': True, + 'merge_count': len(self.support_ticket_ids), + }) + + @api.onchange('support_ticket_id') + def _onchange_support_ticket_id(self): + """Onchange function to add the support ticket id.""" + self.support_ticket_ids.write({ + 'merged_ticket': self.support_ticket_id + }) diff --git a/odoo_website_helpdesk/models/project_task.py b/odoo_website_helpdesk/models/project_task.py new file mode 100644 index 000000000..a626abcd6 --- /dev/null +++ b/odoo_website_helpdesk/models/project_task.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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): + """Inheriting the project task""" + _inherit = 'project.task' + + ticket_id = fields.Many2one('ticket.helpdesk', string='Ticket', + help='ID of the ticket .') + ticket_billed = fields.Boolean('Billed', default=False, + help='Billed Tickets') 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..d3262529f --- /dev/null +++ b/odoo_website_helpdesk/models/res_config_settings.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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): + """Inheriting the res config settings model""" + _inherit = 'res.config.settings' + + show_create_task = fields.Boolean(string="Create Tasks", + config_parameter='odoo_website_helpdesk.show_create_task', + help='Enable this option to allow users' + 'to create tasks directly from the ' + 'helpdesk module. When activated, users ' + 'will have the ability to generate and ' + 'assign tasks as part of their workflow ' + 'within the helpdesk interface.') + show_category = fields.Boolean(string="Category", + config_parameter='odoo_website_helpdesk.show_category', + help='Enable this option to display the ' + 'category field in the helpdesk tickets. ' + 'This can be useful for organizing and ' + 'filtering tickets based on their 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_id = fields.Many2one( + 'ticket.stage', string='Closing stage', + help='Closing Stage of the ticket.', + config_parameter='odoo_website_helpdesk.closed_stage_id') + + reply_template_id = fields.Many2one('mail.template', + domain="[('model', '=', 'ticket.helpdesk')]", + config_parameter='odoo_website_helpdesk.reply_template_id', + help='Reply Template of the helpdesk' + ' ticket.') + helpdesk_menu_show = fields.Boolean('Helpdesk Menu', + config_parameter= + 'odoo_website_helpdesk.helpdesk_menu_show', + help='Helpdesk menu') + + @api.onchange('closed_stage_id') + def _onchange_closed_stage_id(self): + """Closing stage function""" + if self.closed_stage_id: + stage = self.closed_stage_id.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 _constrains_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/support_ticket.py b/odoo_website_helpdesk/models/support_ticket.py new file mode 100644 index 000000000..296408676 --- /dev/null +++ b/odoo_website_helpdesk/models/support_ticket.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 SupportTicket(models.Model): + """Creating onetoMany model""" + _name = 'support.ticket' + _description = 'Support Tickets' + + subject = fields.Char(string='Subject', help='Subject of the merged ' + 'tickets.') + display_name = fields.Char(string='Display Name', + help='Display name of the merged tickets.') + description = fields.Char(string='Description', + help='Description of the tickets.') + support_ticket_id = fields.Many2one('merge.ticket', + string='Support Tickets', + help='Support tickets') + merged_ticket = fields.Integer(string='Merged Ticket ID', + help='Storing merged ticket id') diff --git a/odoo_website_helpdesk/models/team_helpdesk.py b/odoo_website_helpdesk/models/team_helpdesk.py new file mode 100644 index 000000000..c9ede6880 --- /dev/null +++ b/odoo_website_helpdesk/models/team_helpdesk.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 TeamHelpDesk(models.Model): + """Helpdesk team""" + _name = 'team.helpdesk' + _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 of the team member.') + project_id = fields.Many2one('project.project', + string='Project', + help='Projects related helpdesk team.') + create_task = fields.Boolean(string="Create Task", + help="Task created or not") + + @api.onchange('team_lead_id') + def _onchange_team_lead_id(self): + """Members selection function""" + 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/ticket_helpdesk.py b/odoo_website_helpdesk/models/ticket_helpdesk.py new file mode 100644 index 000000000..c6195b2df --- /dev/null +++ b/odoo_website_helpdesk/models/ticket_helpdesk.py @@ -0,0 +1,387 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 logging +from odoo import api, fields, models, _ +from odoo.exceptions import UserError +from odoo.exceptions import ValidationError + +_logger = logging.getLogger(__name__) + +PRIORITIES = [ + ('0', 'Very Low'), + ('1', 'Low'), + ('2', 'Normal'), + ('3', 'High'), + ('4', 'Very High'), +] +RATING = [ + ('0', 'Very Low'), + ('1', 'Low'), + ('2', 'Normal'), + ('3', 'High'), + ('4', 'Very High'), + ('5', 'Extreme High') +] + + +class TicketHelpDesk(models.Model): + """Help_ticket model""" + _name = 'ticket.helpdesk' + _description = 'Helpdesk Ticket' + _inherit = ['mail.thread', 'mail.activity.mixin'] + + def _default_show_create_task(self): + """Task creation""" + return self.env['ir.config_parameter'].sudo().get_param( + 'odoo_website_helpdesk.show_create_task') + + def _default_show_category(self): + """Show category default""" + return self.env['ir.config_parameter'].sudo().get_param( + 'odoo_website_helpdesk.show_category') + + name = fields.Char('Name', default=lambda self: self.env['ir.sequence']. + next_by_code('ticket.helpdesk') or _('New'), + help='Ticket Name') + 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='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') + team_id = fields.Many2one('team.helpdesk', string='Helpdesk Team', + help='Helpdesk Team Name') + product_ids = fields.Many2many('product.template', + string='Product', + help='Product Name') + 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') + stage_id = fields.Many2one('ticket.stage', string='Stage', + tracking=True, + group_expand='_read_group_stage_ids', + help='Stages') + user_id = fields.Many2one('res.users', + default=lambda self: self.env.user, + check_company=True, + index=True, tracking=True, + help='Login User', string='User') + cost = fields.Float('Cost per hour', help='Cost Per Unit') + service_product_id = fields.Many2one('product.product', + string='Service Product', + help='Service Product', + domain=[ + ('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') + public_ticket = fields.Boolean(string="Public Ticket", + help='Public Ticket') + invoice_ids = fields.Many2many('account.move', + string='Invoices', + help='Invoicing id' + ) + task_ids = fields.Many2many('project.task', + string='Tasks', + help='Task id') + 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') + ticket_type_id = fields.Many2one('helpdesk.type', + string='Ticket Type', help='Ticket Type') + team_head_id = fields.Many2one('res.users', string='Team Leader', + compute='_compute_team_head_id', + help='Team Leader Name') + assigned_user_id = fields.Many2one('res.users', string='Assigned User', + domain=lambda self: [('groups_id', 'in', + self.env.ref( + 'odoo_website_helpdesk.helpdesk_user').id)], + help='Assigned User Name') + category_id = fields.Many2one('helpdesk.category', string='Category', + help='Category') + tags_ids = fields.Many2many('helpdesk.tag', help='Tags', string='Tags') + assign_user = fields.Boolean(default=False, help='Assign User', + string='Assign User') + attachment_ids = fields.One2many('ir.attachment', 'res_id', + help='Attachment Line', + string='Attachments') + merge_ticket_invisible = fields.Boolean(string='Merge Ticket', + help='Merge Ticket Invisible or ' + 'Not', default=False) + merge_count = fields.Integer(string='Merge Count', help='Merged Tickets ' + 'Count') + active = fields.Boolean(default=True, help='Active', string='Active') + + show_create_task = fields.Boolean(string="Show Create Task", + help='Show created task or not', + default=_default_show_create_task, + compute='_compute_show_create_task') + create_task = fields.Boolean(string="Create Task", readonly=False, + help='Create task or not', + related='team_id.create_task', store=True) + billable = fields.Boolean(string="Billable", default=False, + help='Is billable or not', ) + show_category = fields.Boolean(default=_default_show_category, + string="Show Category", + help='Show category or not', + compute='_compute_show_category') + customer_rating = fields.Selection(RATING, default='0', readonly=True) + review = fields.Char('Review', readonly=True, help='Ticket review') + kanban_state = fields.Selection([ + ('normal', 'Ready'), + ('done', 'In Progress'), + ('blocked', 'Blocked'), ], default='normal') + + @api.onchange('team_id', 'team_head_id') + def _onchange_team_id(self): + """Changing the team leader when selecting the team""" + li = self.team_id.member_ids.mapped(id) + return {'domain': {'assigned_user_id': [('id', 'in', li)]}} + + @api.depends('team_id') + def _compute_team_head_id(self): + """Compute the team head function""" + self.team_head_id = self.team_id.team_lead_id.id + + @api.onchange('stage_id') + def _onchange_stage_id(self): + """Sending mail to the user function""" + rec_id = self._origin.id + data = self.env['ticket.helpdesk'].search([('id', '=', rec_id)]) + data.last_update_date = fields.Datetime.now() + if self.stage_id.starting_stage: + data.start_date = fields.Datetime.now() + if self.stage_id.closing_stage or self.stage_id.cancel_stage: + data.end_date = fields.Datetime.now() + if self.stage_id.template_id: + mail_template = self.stage_id.template_id + mail_template.send_mail(self._origin.id, force_send=True) + + def assign_to_teamleader(self): + """Assigning team leader function""" + if self.team_id: + self.team_head_id = self.team_id.team_lead_id.id + mail_template = self.env.ref( + 'odoo_website_helpdesk.odoo_website_helpdesk_assign') + mail_template.sudo().write({ + 'email_to': self.team_head_id.email, + 'subject': self.name + }) + mail_template.sudo().send_mail(self.id, force_send=True) + else: + raise ValidationError("Please choose a Helpdesk Team") + + def _compute_show_category(self): + """Compute show category""" + show_category = self._default_show_category() + for rec in self: + rec.show_category = show_category + + def _compute_show_create_task(self): + """Compute the created task""" + 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""" + auto_close = self.env['ir.config_parameter'].sudo().get_param( + 'odoo_website_helpdesk.auto_close_ticket') + if auto_close: + no_of_days = self.env['ir.config_parameter'].sudo().get_param( + 'odoo_website_helpdesk.no_of_days') + records = self.env['ticket.helpdesk'].search([]) + for rec in records: + days = (fields.Datetime.today() - rec.create_date).days + if days >= int(no_of_days): + close_stage_id = self.env['ticket.stage'].search( + [('closing_stage', '=', True)]) + if close_stage_id: + rec.stage_id = close_stage_id + + def default_stage_id(self): + """Method to return the default stage""" + return self.env['ticket.stage'].search( + [('name', '=', 'Draft')], limit=1).id + + def _read_group_stage_ids(self, stages, domain): + """ + return the stages to stage_ids + """ + stage_ids = self.env['ticket.stage'].search([]) + return stage_ids + + @api.model_create_multi + def create(self, vals_list): + """Create function""" + for vals in vals_list: + if vals.get('name', _('New')) == _('New'): + vals['name'] = self.env['ir.sequence'].next_by_code( + 'ticket.helpdesk') + return super(TicketHelpDesk, self).create(vals_list) + + def write(self, vals): + """Write function""" + result = super(TicketHelpDesk, self).write(vals) + return result + + def action_create_invoice(self): + """Create Invoice based on the ticket""" + tasks = self.env['project.task'].search( + [('project_id', '=', self.project_id.id), + ('ticket_id', '=', self.id)]).filtered( + lambda line: not line.ticket_billed) + if not tasks: + raise UserError('No Tasks to Bill') + total = sum(x.effective_hours for x in tasks if + x.effective_hours > 0 and not x.some_flag) + invoice_no = self.env['ir.sequence'].next_by_code( + 'ticket.invoice') + self.env['account.move'].create([ + { + 'name': invoice_no, + 'move_type': 'out_invoice', + 'partner_id': self.customer_id.id, + '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, + })], + }, ]) + for task in tasks: + task.ticket_billed = True + return { + 'effect': { + 'fadeout': 'medium', + 'message': 'Billed Successfully!', + 'type': 'rainbow_man', + } + } + + def action_create_tasks(self): + """Task creation""" + task_id = self.env['project.task'].create({ + 'name': self.name + '-' + self.subject, + 'project_id': self.project_id.id, + 'company_id': self.env.company.id, + 'ticket_id': self.id, + }) + self.write({ + 'task_ids': [(4, task_id.id)] + }) + return { + 'name': 'Tasks', + 'res_model': 'project.task', + 'view_id': False, + 'res_id': task_id.id, + 'view_mode': 'form', + 'type': 'ir.actions.act_window', + 'target': 'new', + } + + def action_open_tasks(self): + """View the Created task """ + return { + 'name': 'Tasks', + 'domain': [('ticket_id', '=', self.id)], + 'res_model': 'project.task', + 'view_id': False, + 'view_mode': 'list,form', + 'type': 'ir.actions.act_window', + } + + def action_open_invoices(self): + """View the Created invoice""" + return { + 'name': 'Invoice', + 'domain': [('ticket_id', '=', self.id)], + 'res_model': 'account.move', + 'view_id': False, + 'view_mode': 'list,form', + 'type': 'ir.actions.act_window', + } + + def action_open_merged_tickets(self): + """Open the merged tickets list view""" + ticket_ids = self.env['support.ticket'].search( + [('merged_ticket', '=', self.id)]) + helpdesk_ticket_ids = ticket_ids.mapped('display_name') + help_ticket_records = self.env['ticket.helpdesk'].search( + [('name', 'in', helpdesk_ticket_ids)]) + return { + 'type': 'ir.actions.act_window', + 'name': 'Helpdesk Ticket', + 'view_mode': 'list,form', + 'res_model': 'ticket.helpdesk', + 'domain': [('id', 'in', help_ticket_records.ids)], + 'context': self.env.context, + } + + def action_send_reply(self): + """Action to sent reply button""" + template_id = self.env['ir.config_parameter'].sudo().get_param( + 'odoo_website_helpdesk.reply_template_id' + ) + template_id = self.env['mail.template'].browse(int(template_id)) + if template_id: + return { + 'type': 'ir.actions.act_window', + 'name': 'mail', + 'res_model': 'mail.compose.message', + 'view_mode': 'form', + 'target': 'new', + 'views': [[False, 'form']], + 'context': { + 'default_model': 'ticket.helpdesk', + 'default_res_ids': self.ids, + 'default_template_id': template_id.id + } + } + return { + 'type': 'ir.actions.act_window', + 'name': 'mail', + 'res_model': 'mail.compose.message', + 'view_mode': 'form', + 'target': 'new', + 'views': [[False, 'form']], + 'context': { + 'default_model': 'ticket.helpdesk', + 'default_res_ids': self.ids, + } + } diff --git a/odoo_website_helpdesk/models/ticket_stage.py b/odoo_website_helpdesk/models/ticket_stage.py new file mode 100644 index 000000000..34c893d4c --- /dev/null +++ b/odoo_website_helpdesk/models/ticket_stage.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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): + """Stage Ticket model """ + _name = 'ticket.stage' + _description = 'Ticket Stage' + _order = 'sequence, id' + _fold_name = 'fold' + + name = fields.Char('Name', help='Name of the ticket stage') + active = fields.Boolean(string='Active', default=True, help='Active option' + 'for ticket ' + 'stage.') + sequence = fields.Integer(string='Sequence', default=50, + help='Sequence number of the ticket stage.') + closing_stage = fields.Boolean('Closing Stage', default=False, + help='Closing stage of the ticket.') + cancel_stage = fields.Boolean('Cancel Stage', default=False, + help='Cancel stage of the ticket.') + starting_stage = fields.Boolean('Start Stage', default=False, + help='Starting Stage of the ticket.') + folded = fields.Boolean('Folded in Kanban', default=False, + help='Folded Stage of the ticket.') + template_id = fields.Many2one('mail.template', + help='Templates', string='Template', + domain="[('model', '=', 'ticket.helpdesk')]") + group_ids = fields.Many2many('res.groups', help='Group', string='Groups') + fold = fields.Boolean(string='Fold', help='Folded option in ticket.') + + def unlink(self): + """Unlinking Function to unlink the 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..e6a0906ce --- /dev/null +++ b/odoo_website_helpdesk/models/website_menu.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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""" + _inherit = "website.menu" + + def _compute_visible(self): + """Compute function for to visible the menu based on the boolean + field visibility""" + 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 not show_menu_header: + menu.is_visible = False + if menu.name == 'Helpdesk' and show_menu_header: + menu.is_visible = True diff --git a/odoo_website_helpdesk/report/helpdesk_ticket_report_template.xml b/odoo_website_helpdesk/report/helpdesk_ticket_report_template.xml new file mode 100644 index 000000000..7fafdb0b1 --- /dev/null +++ b/odoo_website_helpdesk/report/helpdesk_ticket_report_template.xml @@ -0,0 +1,114 @@ + + + + + + + Support Ticket + ticket.helpdesk + qweb-pdf + odoo_website_helpdesk.report_helpdesk_ticket + odoo_website_helpdesk.report_helpdesk_ticket + + + report + + diff --git a/odoo_website_helpdesk/security/ir.model.access.csv b/odoo_website_helpdesk/security/ir.model.access.csv new file mode 100644 index 000000000..6be3b5de7 --- /dev/null +++ b/odoo_website_helpdesk/security/ir.model.access.csv @@ -0,0 +1,24 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink + +access_help_ticket,access.ticket.helpdesk,model_ticket_helpdesk,,1,1,1,1 + +access_help_ticket_teams_user,access.team.helpdesk,model_team_helpdesk,odoo_website_helpdesk.helpdesk_user,1,0,0,0 +access_help_ticket_teams_leader,access.team.helpdesk,model_team_helpdesk,odoo_website_helpdesk.helpdesk_team_leader,1,0,0,0 +access_help_ticket_teams_manager,access.team.helpdesk,model_team_helpdesk,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_type_user,access.helpdesk.type,model_helpdesk_type,odoo_website_helpdesk.helpdesk_user,1,0,0,0 +access_helpdesk_type_leader,access.helpdesk.type,model_helpdesk_type,odoo_website_helpdesk.helpdesk_team_leader,1,1,1,1 +access_helpdesk_type_manager,access.helpdesk.type,model_helpdesk_type,odoo_website_helpdesk.helpdesk_manager,1,1,1,1 + +access_helpdesk_category_user,access_helpdesk_category,model_helpdesk_category,odoo_website_helpdesk.helpdesk_user,1,0,0,0 +access_helpdesk_category_leader,access_helpdesk_category,model_helpdesk_category,odoo_website_helpdesk.helpdesk_team_leader,1,1,1,1 +access_helpdesk_category_manager,access_helpdesk_category,model_helpdesk_category,odoo_website_helpdesk.helpdesk_manager,1,1,1,1 + +merge_tickets,merge.ticket,model_merge_ticket,odoo_website_helpdesk.helpdesk_manager,1,1,1,1 +support_tickets,support.ticket,model_support_ticket,odoo_website_helpdesk.helpdesk_manager,1,1,1,1 diff --git a/odoo_website_helpdesk/security/odoo_website_helpdesk_groups.xml b/odoo_website_helpdesk/security/odoo_website_helpdesk_groups.xml new file mode 100644 index 000000000..15afcca2d --- /dev/null +++ b/odoo_website_helpdesk/security/odoo_website_helpdesk_groups.xml @@ -0,0 +1,38 @@ + + + + + Helpdesk + Helpdesk Access Groups + 20 + + + + User + + + + + Team Leader + + + + + + Manager + + + + + + group_show_category + + + + group_show_subcategory + + + + + + diff --git a/odoo_website_helpdesk/security/odoo_website_helpdesk_security.xml b/odoo_website_helpdesk/security/odoo_website_helpdesk_security.xml new file mode 100644 index 000000000..f0e9aa87c --- /dev/null +++ b/odoo_website_helpdesk/security/odoo_website_helpdesk_security.xml @@ -0,0 +1,85 @@ + + + + + Record Rule for team leader + + + ['&', ('team_head_id.id', '=', user.id), ('stage_id.group_ids.users', 'in', + user.id)] + + + + + + + + + Record Rule for manager + + + [(1, '=', 1)] + + + + + + + + Record Rule for user + + + ['&', ('assigned_user_id', '=', user.id), ('stage_id.group_ids.users', 'in', + user.id)] + + + + + + + + + Record Rule stages leader + + + [('group_ids.users', 'in', user.id)] + + + + + + + + Record Rule stages manager + + + [(1, '=', 1)] + + + + + + + + Record Rule stages user + + + [('group_ids.users', 'in', user.id)] + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/cybro-icon.png b/odoo_website_helpdesk/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/cybro-icon.png differ diff --git a/odoo_website_helpdesk/static/description/assets/cybro-odoo.png b/odoo_website_helpdesk/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/cybro-odoo.png differ diff --git a/odoo_website_helpdesk/static/description/assets/h2.png b/odoo_website_helpdesk/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/h2.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/arrows-repeat.svg b/odoo_website_helpdesk/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/banner-1.png b/odoo_website_helpdesk/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/banner-1.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/banner-2.svg b/odoo_website_helpdesk/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/banner-bg.png b/odoo_website_helpdesk/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/banner-bg.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/banner-bg.svg b/odoo_website_helpdesk/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/banner-call.svg b/odoo_website_helpdesk/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/banner-mail.svg b/odoo_website_helpdesk/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/banner-pattern.svg b/odoo_website_helpdesk/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/banner-promo.svg b/odoo_website_helpdesk/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/brand-pair.svg b/odoo_website_helpdesk/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/check.png b/odoo_website_helpdesk/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/check.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/chevron.png b/odoo_website_helpdesk/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/chevron.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/close-icon.svg b/odoo_website_helpdesk/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/cogs.png b/odoo_website_helpdesk/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/cogs.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/collabarate-icon.svg b/odoo_website_helpdesk/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/consultation.png b/odoo_website_helpdesk/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/consultation.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/cybro-logo.png b/odoo_website_helpdesk/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/cybro-logo.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/down.svg b/odoo_website_helpdesk/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/odoo_website_helpdesk/static/description/assets/icons/ecom-black.png b/odoo_website_helpdesk/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/education-black.png b/odoo_website_helpdesk/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/education-black.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/faq.png b/odoo_website_helpdesk/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/faq.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/feature-icon.svg b/odoo_website_helpdesk/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/feature.png b/odoo_website_helpdesk/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/feature.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/gear.svg b/odoo_website_helpdesk/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/hero.gif b/odoo_website_helpdesk/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..380654dfe Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/hero.gif differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/hire-odoo.svg b/odoo_website_helpdesk/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/hotel-black.png b/odoo_website_helpdesk/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/license.png b/odoo_website_helpdesk/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/license.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/life-ring-icon.svg b/odoo_website_helpdesk/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/lifebuoy.png b/odoo_website_helpdesk/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/mail.svg b/odoo_website_helpdesk/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/manufacturing-black.png b/odoo_website_helpdesk/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/notes.png b/odoo_website_helpdesk/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/notes.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/notification icon.svg b/odoo_website_helpdesk/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/odoo-consultancy.svg b/odoo_website_helpdesk/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/odoo-licencing.svg b/odoo_website_helpdesk/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/odoo-logo.png b/odoo_website_helpdesk/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/odoo-logo.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/patter.svg b/odoo_website_helpdesk/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/pattern1.png b/odoo_website_helpdesk/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/pattern1.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/pos-black.png b/odoo_website_helpdesk/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/pos-black.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/puzzle-piece-icon.svg b/odoo_website_helpdesk/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/puzzle.png b/odoo_website_helpdesk/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/puzzle.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/replace-icon.svg b/odoo_website_helpdesk/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/restaurant-black.png b/odoo_website_helpdesk/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/screenshot-main.png b/odoo_website_helpdesk/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/screenshot-main.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/screenshot.png b/odoo_website_helpdesk/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/screenshot.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/service-black.png b/odoo_website_helpdesk/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/service-black.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/skype-fill.svg b/odoo_website_helpdesk/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/skype.png b/odoo_website_helpdesk/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/skype.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/skype.svg b/odoo_website_helpdesk/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/star-1.svg b/odoo_website_helpdesk/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/star-2.svg b/odoo_website_helpdesk/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/support.png b/odoo_website_helpdesk/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/support.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/test-1 - Copy.png b/odoo_website_helpdesk/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/test-1 - Copy.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/test-1.png b/odoo_website_helpdesk/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/test-1.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/test-2.png b/odoo_website_helpdesk/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/test-2.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/trading-black.png b/odoo_website_helpdesk/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/trading-black.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/training.png b/odoo_website_helpdesk/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/training.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/translate.svg b/odoo_website_helpdesk/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/update.png b/odoo_website_helpdesk/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/update.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/user.png b/odoo_website_helpdesk/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/user.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/video.png b/odoo_website_helpdesk/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/video.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/whatsapp.png b/odoo_website_helpdesk/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/whatsapp.png differ diff --git a/odoo_website_helpdesk/static/description/assets/icons/wrench-icon.svg b/odoo_website_helpdesk/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/odoo_website_helpdesk/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_website_helpdesk/static/description/assets/icons/wrench.png b/odoo_website_helpdesk/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/icons/wrench.png differ diff --git a/odoo_website_helpdesk/static/description/assets/modules/1.gif b/odoo_website_helpdesk/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/1.gif differ diff --git a/odoo_website_helpdesk/static/description/assets/modules/2.gif b/odoo_website_helpdesk/static/description/assets/modules/2.gif new file mode 100644 index 000000000..d19e2b352 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/2.gif 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..8513873ea 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..3bedf7981 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.png b/odoo_website_helpdesk/static/description/assets/modules/5.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/5.png differ diff --git a/odoo_website_helpdesk/static/description/assets/modules/6.jpg b/odoo_website_helpdesk/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/modules/6.jpg differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/1.png b/odoo_website_helpdesk/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..32e8547e7 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/1.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/10.png b/odoo_website_helpdesk/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..5804656cf Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/10.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/11.png b/odoo_website_helpdesk/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..d4f9f1b90 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/11.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/12.png b/odoo_website_helpdesk/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..b239f27a1 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/12.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/13.png b/odoo_website_helpdesk/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..b4353deed Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/13.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/14.png b/odoo_website_helpdesk/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..a71fba592 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/14.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/15.png b/odoo_website_helpdesk/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..07ad28ec9 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/15.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/16.png b/odoo_website_helpdesk/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..90d0b5b9d Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/16.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/17.png b/odoo_website_helpdesk/static/description/assets/screenshots/17.png new file mode 100644 index 000000000..a644c7b3e Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/17.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/18.png b/odoo_website_helpdesk/static/description/assets/screenshots/18.png new file mode 100644 index 000000000..ea342b4a7 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/18.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/19.png b/odoo_website_helpdesk/static/description/assets/screenshots/19.png new file mode 100644 index 000000000..b5fe68e68 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/19.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/2.png b/odoo_website_helpdesk/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..7cd0b4c63 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/2.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/20.png b/odoo_website_helpdesk/static/description/assets/screenshots/20.png new file mode 100644 index 000000000..3609c0828 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/20.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/21.png b/odoo_website_helpdesk/static/description/assets/screenshots/21.png new file mode 100644 index 000000000..698ac9a6b Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/21.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/22.png b/odoo_website_helpdesk/static/description/assets/screenshots/22.png new file mode 100644 index 000000000..bd1bf564a Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/22.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/23.png b/odoo_website_helpdesk/static/description/assets/screenshots/23.png new file mode 100644 index 000000000..8a4f8029d Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/23.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/24.png b/odoo_website_helpdesk/static/description/assets/screenshots/24.png new file mode 100644 index 000000000..b24f82499 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/24.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/25.png b/odoo_website_helpdesk/static/description/assets/screenshots/25.png new file mode 100644 index 000000000..6a22e6b66 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/25.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/26.png b/odoo_website_helpdesk/static/description/assets/screenshots/26.png new file mode 100644 index 000000000..596fcdc68 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/26.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/27.png b/odoo_website_helpdesk/static/description/assets/screenshots/27.png new file mode 100644 index 000000000..aee1613a7 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/27.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/3.png b/odoo_website_helpdesk/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..cbac4c1ea Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/3.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/4.png b/odoo_website_helpdesk/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..e6674ce66 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/4.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/5.png b/odoo_website_helpdesk/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..c40041c9e Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/5.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/6.png b/odoo_website_helpdesk/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..063e3c7d3 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/6.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/7.png b/odoo_website_helpdesk/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..171264b48 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/7.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/8.png b/odoo_website_helpdesk/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..5f57c2d44 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/8.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/9.png b/odoo_website_helpdesk/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..641045d74 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/9.png differ diff --git a/odoo_website_helpdesk/static/description/assets/screenshots/hero.gif b/odoo_website_helpdesk/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..06397aeea Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_website_helpdesk/static/description/assets/y18.jpg b/odoo_website_helpdesk/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/odoo_website_helpdesk/static/description/assets/y18.jpg differ diff --git a/odoo_website_helpdesk/static/description/banner.png b/odoo_website_helpdesk/static/description/banner.png new file mode 100644 index 000000000..66765b17a Binary files /dev/null and b/odoo_website_helpdesk/static/description/banner.png differ diff --git a/odoo_website_helpdesk/static/description/icon.png b/odoo_website_helpdesk/static/description/icon.png new file mode 100644 index 000000000..0a91806ff Binary files /dev/null and b/odoo_website_helpdesk/static/description/icon.png differ diff --git a/odoo_website_helpdesk/static/description/index.html b/odoo_website_helpdesk/static/description/index.html new file mode 100644 index 000000000..c08eb29c1 --- /dev/null +++ b/odoo_website_helpdesk/static/description/index.html @@ -0,0 +1,1532 @@ + + + + + + Website Helpdesk Support Ticket Management + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

A Module For Managing Support Tickets. +

+

Website Helpdesk Support Ticket Management +

+
+
+ +
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+

Key + Highlights

+
+
+
+
+ +
+
+ +Website Ticket Creation +
+
+
+
+
+
+ +
+
+ View created tickets from portal + + +
+
+
+
+
+
+ +
+
+ Create Tasks for the project linked to the Ticket +
+
+
+
+
+
+ +
+
+ Link a project to the Ticket and invoice based on the tasks timesheet +
+
+
+
+
+
+ +
+
+ Tickets can be viewed and managed from backend +
+
+
+
+
+
+ +
+
+ Customise stages or use predefined stages for seeing the status of ticket +
+
+
+
+
+ +
+
+
+ Website Helpdesk Support Ticket Management +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ Helpdesk Ticket + + View +

+
+
+

+ This is the Helpdesk Ticket Kanban Form view. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Helpdesk + Teams +

+
+
+

In the "Configuration" menu, you can see "Teams" to allocate teams to Helpdesk Tickets. To create a new team, select the "NEW" button. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

This is the Helpdesk Teams form, where you can configure the team. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

Under the tab "Other Information" on the Helpdesk Ticket form view, there is a "Helpdesk Team" option where we can mention the matching team to the Helpdesk ticket. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Helpdesk + Tags +

+
+
+

In the "Configuration" menu, you can see "Tags" to allocate tags to Helpdesk Tickets. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

+ Using the "NEW" button you can create new tags. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

+ On the Helpdesk Ticket form view, there is a "Tags" option where we can mention the matching tags to the Helpdesk ticket. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Helpdesk + Stages +

+
+
+

In the "Configuration" menu, you can see "Stages" to allocate stages to Helpdesk Tickets. Using the "NEW" button you can create new stages. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

On the Helpdesk Ticket form view, we can see the stages of the tickets based on the settings we configured in the Configuration.

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Helpdesk + Types. +

+
+
+

In the "Configuration" menu, you can see "Types" to allocate types to Helpdesk Tickets. Using the "NEW" button you can create new types. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

On the Helpdesk Ticket form view, there is a "Ticket Type" option where we can mention the matching type to the Helpdesk ticket. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Create + Tasks +

+
+
+

The option "Create Tasks" may be found in the "Configuration > Settings" menu; by enabling it, you can generate tasks from the Helpdesk Ticket. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

To create the task from the helpdesk ticket form view, enable the "Create Task" option and select the "Service Product". +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

You may also produce a bill for a helpdesk ticket by activating the "Billable" option. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Categories +

+
+
+

The option "Categories" may be found in the "Configuration > Settings" menu; by enabling it, you will get an additional menu as "Categories" in the "Configuration" menu. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

You can also create new "Categories" from the "NEW" button. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

In the Helpdesk Ticket form view under the "Other Information" tab you will have the option called "Category" there you can mention the corresponding category to the Helpdesk Ticket. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Helpdesk + Menu +

+
+
+

The option "Helpdesk Menu" may be found in the "Configuration > Settings" menu; by enabling it, you create the helpdesk ticket through odoo website. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

Then you can see a new option as "Helpdesk" in the odoo website. So you can enter the relevant datas for the helpdesk ticket. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

After completing the details regarding the helpdesk ticket. You can click on the "Submit" button. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

Then you may see the ticket's Reference Code in the Thank You page that appears when the helpdesk ticket is generated. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Product on + Website +

+
+
+

The option "Product on Website" may be found in the "Configuration > Settings" menu; by enabling it, you can select the product along with helpdesk ticket. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

As you can see on the website form view for creating the helpdesk ticket, a new option has been added as "Products" to add the products to the helpdesk ticket while this option is enabled. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Auto Close + Ticket +

+
+
+

Enable the "Auto Close Ticket" option in the "Configuration > Settings" menu to automatically close tickets when the number of days reaches a certain threshold specified in the "No of Days" field. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Close + Stage +

+
+
+

The option "Close Stage" may be found in the "Configuration > Settings" menu; by configuring it, you can select default closing stage for the helpdesk ticket. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Reply + Template +

+
+
+

The option "Reply Template" may be found in the "Configuration > Settings" menu; by configuring it, you can select default Reply Template for the helpdesk ticket. +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Report +

+
+
+

The "Report" option displays the ticket reports. +

+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+

+ Website Ticket Creation.

+
+ +
+
+
+
+
+
+ +
+

View created tickets from portal.

+
+
+
+
+
+
+
+ +
+

Create Tasks for the project linked to the Ticket.

+
+
+
+
+
+
+
+ +
+

Link a project to the Ticket and invoice based on the tasks timesheet.

+
+
+
+
+
+
+
+ +
+

Tickets can be viewed and managed from backend

+
+
+
+
+
+
+
+ +
+

Customise stages or use predefined stages for seeing the status of ticket

+
+
+
+
+
+
+
+
+
+
+ +
+ +
+ +
+

+ Yes you can. +

+
+
+
+ +
+
+
+
+
+
+ +
+
+

+ Latest Release 18.0.1.0.0 +

+ + 30th October, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/odoo_website_helpdesk/static/src/js/multiple_product_choose.js b/odoo_website_helpdesk/static/src/js/multiple_product_choose.js new file mode 100644 index 000000000..5e01de43b --- /dev/null +++ b/odoo_website_helpdesk/static/src/js/multiple_product_choose.js @@ -0,0 +1,23 @@ +/** @odoo-module **/ +import { rpc } from '@web/core/network/rpc'; +import publicWidget from "@web/legacy/js/public/public_widget"; +// loads product data from the server and populates a dropdown menu with the received product information +publicWidget.registry.product_load = publicWidget.Widget.extend({ + selector: '#product', + start: function() { + var self = this; + return this._super.apply(this, arguments).then(function() { + self._loadProducts(); + }); + }, + _loadProducts: function() { + var self = this; + rpc('/product').then(function(res) { + var ar = res; + self.$el.find('#product').prevObject.empty(); + $(ar).each(function(i) { + self.$el.find('#product').prevObject.append(""); + }); + }); + }, +}); diff --git a/odoo_website_helpdesk/static/src/js/portal_search.js b/odoo_website_helpdesk/static/src/js/portal_search.js new file mode 100644 index 000000000..71ee5a66b --- /dev/null +++ b/odoo_website_helpdesk/static/src/js/portal_search.js @@ -0,0 +1,29 @@ +/** @odoo-module **/ +import { rpc } from '@web/core/network/rpc'; +import publicWidget from "@web/legacy/js/public/public_widget"; +publicWidget.registry.TT = publicWidget.Widget.extend({ + selector: '#ticket', + events: { + 'change #group_select': '_onGroupSelectChange', + 'click #search_ticket': '_onSubmit', + }, +// GroupBy filtering the portal tickets + _onGroupSelectChange: function (ev) { + var self = this; + var searchValue = this.$el.find('#group_select').val(); + rpc('/ticketgroupby', { + 'search_value': searchValue, + }).then(function (result) { + $('.search_ticket').html(result); + }); + }, +// Searching the portal tickets + _onSubmit(ev) { + var search_value = this.$el.find('#search_box').val(); + rpc('/ticketsearch', { + 'search_value': search_value, + }).then(function(result) { + $('.search_ticket').html(result); + }); + } +}) diff --git a/odoo_website_helpdesk/static/src/js/ticket_details.js b/odoo_website_helpdesk/static/src/js/ticket_details.js new file mode 100644 index 000000000..d39b80761 --- /dev/null +++ b/odoo_website_helpdesk/static/src/js/ticket_details.js @@ -0,0 +1,31 @@ +/** @odoo-module **/ +//enables a popover on elements with the ID 'popover' when a mouseover event occurs. + $(document).on("mouseover", "#popover", function (event) { + var self = this; + var item_text = ""; + if (self.parentElement.parentElement.children[3]) { + item_text = + "Ticket : " + + self.parentElement.parentElement.children[1].outerText + + "
" + + "Subject : " + + self.parentElement.parentElement.children[2].outerText + + "
" + + "Cost : " + + self.parentElement.parentElement.children[4].outerText + + "
" + + "Priority : " + + self.parentElement.parentElement.children[6].outerText+ + "
" +"
" + + "Description : " + + self.parentElement.parentElement.children[3].outerText + + "
"; + } + $(this).popover({ + html: true, + placement: "right", + trigger: "hover", + title: "Ticket Details", + content: "" + item_text + "", + }); + }); diff --git a/odoo_website_helpdesk/static/src/scss/rating.css b/odoo_website_helpdesk/static/src/scss/rating.css new file mode 100644 index 000000000..432b2b224 --- /dev/null +++ b/odoo_website_helpdesk/static/src/scss/rating.css @@ -0,0 +1,533 @@ +.starRating{ + display : inline-block; + position : relative; + height : 24px; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 0; + margin-bottom:10px; + margin-left: 8px; + +} + +.starR{ + display : inline-block; + position : relative; + height : 24px; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 0; + margin-bottom:7px; +} +.starRating div{ + float : left; + position : relative; + height : 24px; +} +.starRating input{ + position : relative; + z-index : 1; + width : 24px; + height : 24px; + margin : 0; + padding : 0; + opacity : 0; +} +.starRating label{ + position : absolute; + top : 0; + left : 0; + width : 100%; + height : 24px; +} +.starRating span{ + display : none; +} +.starRating input:checked + label, +.starRating:hover input:checked:hover + label{ + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 -24px; +} +.starRating:hover input:checked + label{ + background : transparent; +} +.starRating:hover input:hover + label{ + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 -48px; +} + +.starRating1{ + display : inline-block; + position : relative; + height : 24px; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 0; + vertical-align : bottom; + float:left; + margin-top:-5px; + +} +.starRating1 div{ + float : left; + position : relative; + height : 24px; +} +.starRating1 input{ + position : relative; + z-index : 1; + width : 24px; + height : 24px; + margin : 0; + padding : 0; + opacity : 0; +} + +.starRating1 label{ + position : absolute; + top : 0; + left : 0px; + width : 100%; + height : 24px; + +} +.starRating1 span{ + display : none; +} +.starRating1 input:checked + label{ + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 -24px; +} + +input:checked + label{ + background : transparent; +} + +.starRating2{ + display : inline-block; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 0; + margin-bottom:5px; + margin-left: 8px; +} +.starRating2 div{ + float : left; +} +.starRating2 input{ + width : 24px; + opacity : 0; +} +.starRating2 label{ + position : absolute; +} +.starRating2 span{ + display : none; +} + +.image_star{ + display : inline-block; + position : relative; + height : 24px; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 -24px; + vertical-align : bottom; + color :white; + width:24px; + top:8px; +} +.rate_effect{ + float:left; + color: #168D93; + font-size:17px; + padding-right: 48px; + width: 180px; +} +.social-button_rate{ + display: inline-block; + height: 25px; + vertical-align: middle; + width: 125px; +} +@media (max-width:500px) + { + .social-button_rate + { + width:300px !important; + margin-left:40px; + } + } +@media (max-width:500px) + { + .social-button + { + float:left; + } + } +.cancel_rating_class{ + width: 16px; + height: 16px; + border:none; + background-color:white; + float:left; + margin-left:4px; + margin-top: 5px; +} + +div.cancel_rating_class, div.cancel_rating_class a{ + background: url("/multi_vendor_marketplace/static/src/img/thumb_icon.png") no-repeat scroll 0 -16px rgba(0, 0, 0, 0); + background-position:0 0; + } + +div.cancel_rating_class:hover{ + background: url("/multi_vendor_marketplace/static/src/img/thumb_icon.png") no-repeat scroll 0 -16px rgba(0, 0, 0, 0); + background-position:0 0px; +} +/*---------------------------------average star----------------------------------------*/ +span.stars, span.stars span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; +} +span.stars span { + background-position: 0 0; +} +span.stars3, span.stars span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; +} +span.stars3 span { + background-position: 0 0; +} + + +span.stars4, span.stars4 span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; + margin-top:10px; +} +span.stars4 span { + background-position: 0 0; +} + + + +span.stars3, span.stars3 span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; + +} + +span.stars4 span { + background-position: 0 0; +} + +span.stars3, span.stars3 span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; + +} +span.stars3 span { + background-position: 0 0; +} +/*---------------------------------------blog short--------------------------------------------*/ +.rate_format_short{ + margin-bottom: -10px;margin-bottom: -10px; + float:right; + margin-right: 139px; + margin-top: -7px; + width: 250px; +} +/*------------------------------------pager-------------------------------------------------*/ +.jPaginate{ + height:34px; + position:relative; + color:#168D93; + font-size:small; + width:100%; +} +.jPaginate a{ + line-height:15px; + height:18px; + cursor:pointer; + padding:1px 5px 10px; + margin:2px; + margin-top:5px; + text-decoration:none; + float:left; + } +.jPag-control-back{ + position:absolute; + left:0px; +} + +.jPag-control-front{ + position:absolute; + top:0px; +} +.jPaginate span{ + cursor:pointer; +} +ul.jPag-pages{ + float:left; + list-style-type:none; + margin:0px 0px 0px 0px; + padding:0px; +} +ul.jPag-pages li{ + display:inline; + float:left; + padding:0px; + margin:0px; +} +ul.jPag-pages li a{ + float:left; + padding:2px 5px; + +} +span.jPag-current{ + cursor:default; + font-weight:normal; + line-height:15px; + height:18px; + padding:2px 5px; + margin:2px; + margin-top:5px; + float:left; +} +ul.jPag-pages li span.jPag-previous, +ul.jPag-pages li span.jPag-next, +span.jPag-sprevious, +span.jPag-snext, +ul.jPag-pages li span.jPag-previous-img, +ul.jPag-pages li span.jPag-next-img, +span.jPag-sprevious-img, +span.jPag-snext-img{ + height:22px; + margin:2px; + float:left; + line-height:18px; +} + +ul.jPag-pages li span.jPag-previous, +ul.jPag-pages li span.jPag-previous-img{ + margin:2px 0px 2px 2px; + font-size:12px; + font-weight:bold; + width:10px; + +} +ul.jPag-pages li span.jPag-next, +ul.jPag-pages li span.jPag-next-img{ + margin:2px 2px 2px 0px; + font-size:12px; + font-weight:bold; + width:10px; +} +span.jPag-sprevious, +span.jPag-sprevious-img{ + margin:2px 0px 2px 2px; + font-size:18px; + width:15px; + text-align:right; +} +span.jPag-snext, +span.jPag-snext-img{ + margin:2px 2px 2px 0px; + font-size:18px; + width:15px; + text-align:right; +} +ul.jPag-pages li span.jPag-previous-img{ + background:transparent url(/website_ept/static/src/img/pager/previous.png) no-repeat center right; + } +ul.jPag-pages li span.jPag-next-img{ + background:transparent url(/website_ept/static/src/img/pager/next.png) no-repeat center left; + } +span.jPag-sprevious-img{ + background:transparent url(/website_ept/static/src/img/pager/sprevious.png) no-repeat center right; + } +span.jPag-snext-img{ + background:transparent url(/website_ept/static/src/img/pager/snext.png) no-repeat center left; + } + + + +---------------------------------shop-----------------------------------------------*/ +.class_href1_shop{ + margin-top:-20px; +} +.alert_form_class{ + display:none; +} +.form_shop{ +width:500px; +display: none; +background-color:white; +overflow:hidden; +padding:15px; +box-shadow: 0 5px 9px -7px #168D93 inset, 0 -3px 9px -7px #168D93 inset; +} +@media (max-width:500px) +{ + .form_shop{ + width:200px !important; + } +} +@media (max-width:1000px) +{ + .form_shop{ + width:400px !important; + } +} +.input_class{ + width:350px; +} +@media (max-width:500px) +{ + .input_class{ + width:170px !important; + } +} +@media (max-width:1000px) +{ + .input_class{ + width:300px !important; + } +} +.input_shop +{ +margin-left:50px; +} +.class_href1_shop +{ +color:black; +padding:10px 10px 9px; +font-size:17px; +font-weight:bold; +} +.oe_product .oe_product_image img +{ +position:relative !important; + +} +.rate_format +{ + +display:inline-block; +margin: 0px auto; + +} +.stars3 > span +{ +padding:0px !important; +margin:0px !important; +} +.stars4 > span +{ +padding:0px !important; +margin:0px !important; +} +.oe_product .oe_product_image +{ +left:0px !important; +right:0px !important; +top:0px !important; + +bottom: 55px !important; +text-align: center !important; +} +.posted_on_product_rate_date +{ +font-size:14px; +color: gainsboro; +} +.css_product_long +{ +width: 100%; +display: inline-block; +font-style:italic; +font-size: 14px; +color: aliceblue; +padding-top:10px; + +} +.css_poduct_long >p +{ +margin:0px !important; +} +.review_class_rating +{ +font-size:13px; + +} +.media:first-child +{ +margin-top:10px !important; + +} + + +.medianew +{ +margin-top:10px !important; +background-color: #878787; +padding: 17px; +display: inline-block; +width: 100%; +box-shadow: 0 13px 8px -5px #777; +margin-top: 20px !important; +} + +.product_short +{ +font-weight:bold; +color:white; +margin-bottom:7px; +font-size:16px; +} +form >.media +{ +background-color:transparent !important; +box-shadow:0px 0px 0px 0px !important; +} +.post_your_review +{ +font-size:22px; +margin-top:20px; +margin-bottom:-32px; +color: black; +font-weight: 600; + +} +#demo5 +{ +margin-top:20px; +} +.mb32 +{ +margin-top:0px; +border: 0px !important; +} +div +{ +} +.whole_rate_format_class +{ +display: inline-block; +width: 100%; +background-color: rgba(204, 204, 204,0.6); +} + +.h1 +{ +width:100%; +display:inline-block; +} diff --git a/odoo_website_helpdesk/static/src/xml/helpdesk_dashboard.xml b/odoo_website_helpdesk/static/src/xml/helpdesk_dashboard.xml new file mode 100644 index 000000000..8f3a4dfdb --- /dev/null +++ b/odoo_website_helpdesk/static/src/xml/helpdesk_dashboard.xml @@ -0,0 +1,278 @@ + + diff --git a/odoo_website_helpdesk/views/helpdesk_category_views.xml b/odoo_website_helpdesk/views/helpdesk_category_views.xml new file mode 100644 index 000000000..0c6e5beef --- /dev/null +++ b/odoo_website_helpdesk/views/helpdesk_category_views.xml @@ -0,0 +1,20 @@ + + + + + helpdesk.category.view.list + helpdesk.category + + + + + + + + + + Categories + helpdesk.category + list + + diff --git a/odoo_website_helpdesk/views/helpdesk_menu_views.xml b/odoo_website_helpdesk/views/helpdesk_menu_views.xml new file mode 100644 index 000000000..1f4cb9bed --- /dev/null +++ b/odoo_website_helpdesk/views/helpdesk_menu_views.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_website_helpdesk/views/helpdesk_tag_views.xml b/odoo_website_helpdesk/views/helpdesk_tag_views.xml new file mode 100644 index 000000000..04c0d2070 --- /dev/null +++ b/odoo_website_helpdesk/views/helpdesk_tag_views.xml @@ -0,0 +1,24 @@ + + + + + helpdesk.tag.view.list + helpdesk.tag + + + + + + + + + Tags + helpdesk.tag + list + +

+ Create a new record! +

+
+
+
\ No newline at end of file diff --git a/odoo_website_helpdesk/views/helpdesk_type_views.xml b/odoo_website_helpdesk/views/helpdesk_type_views.xml new file mode 100644 index 000000000..305946b88 --- /dev/null +++ b/odoo_website_helpdesk/views/helpdesk_type_views.xml @@ -0,0 +1,24 @@ + + + + + helpdesk.type.view.list + helpdesk.type + + + + + + + + + Types + helpdesk.type + list + +

+ Create a new record! +

+
+
+
diff --git a/odoo_website_helpdesk/views/merge_ticket_views.xml b/odoo_website_helpdesk/views/merge_ticket_views.xml new file mode 100644 index 000000000..912cd6c3d --- /dev/null +++ b/odoo_website_helpdesk/views/merge_ticket_views.xml @@ -0,0 +1,58 @@ + + + + + merge.ticket.view.form + merge.ticket + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ + + Merge Tickets + merge.ticket + ir.actions.act_window + {'active_ids': active_ids} + form + + new + + +
diff --git a/odoo_website_helpdesk/views/odoo_website_helpdesk_portal_templates.xml b/odoo_website_helpdesk/views/odoo_website_helpdesk_portal_templates.xml new file mode 100644 index 000000000..8c7eee84d --- /dev/null +++ b/odoo_website_helpdesk/views/odoo_website_helpdesk_portal_templates.xml @@ -0,0 +1,322 @@ + + + + + + + + + + + + + + + + + + diff --git a/odoo_website_helpdesk/views/portal_templates.xml b/odoo_website_helpdesk/views/portal_templates.xml new file mode 100644 index 000000000..b28f7d9bf --- /dev/null +++ b/odoo_website_helpdesk/views/portal_templates.xml @@ -0,0 +1,21 @@ + + + + + diff --git a/odoo_website_helpdesk/views/rating_form.xml b/odoo_website_helpdesk/views/rating_form.xml new file mode 100644 index 000000000..2075ad186 --- /dev/null +++ b/odoo_website_helpdesk/views/rating_form.xml @@ -0,0 +1,158 @@ + + + +