diff --git a/enhanced_survey_management/README.rst b/enhanced_survey_management/README.rst new file mode 100644 index 000000000..eee0ec438 --- /dev/null +++ b/enhanced_survey_management/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/licence-OPL--1-red.svg + :target: https://www.odoo.com/documentation/15.0/legal/licenses.html#odoo-apps + :alt: License: OPL-1 + + +Enhanced Survey Management +========================== +* Enhance your survey management with this module. + +Installation +============ + - www.odoo.com/documentation/15.0/setup/install.html + - Install our custom addon + +License +------- +Odoo Proprietary License v1.0 (OPL-1) +(https://www.odoo.com/documentation/15.0/legal/licenses.html#odoo-apps) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V15) Gayathri V + (V16) Mohammed Savad, Ahammed Harshad, Gee Paul Joby, Nihala Jebin, +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://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 +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/enhanced_survey_management/__init__.py b/enhanced_survey_management/__init__.py new file mode 100644 index 000000000..c65cfa3b1 --- /dev/null +++ b/enhanced_survey_management/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from . import controllers +from . import models diff --git a/enhanced_survey_management/__manifest__.py b/enhanced_survey_management/__manifest__.py new file mode 100644 index 000000000..5528b53de --- /dev/null +++ b/enhanced_survey_management/__manifest__.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0 OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +{ + 'name': 'Enhanced Survey Management', + 'version': '15.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'Enhance your survey management with new question kinds and more', + 'description': 'Upgrade your survey management capabilities with the ' + 'addition of versatile question types. ' + 'Capture specific timeframes by incorporating questions ' + 'about the month, week, or range, ' + 'enabling finer data analysis. ' + 'Furthermore, enhance data collection by allowing ' + 'respondents to upload files, ' + 'fostering a more comprehensive understanding of their ' + 'experiences.' + 'Explore these new question types and optimize your survey ' + 'strategy for enhanced insights.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['survey', 'website'], + 'data': [ + 'data/enhanced_survey_management_data.xml', + 'security/ir.model.access.csv', + 'views/survey_templates.xml', + 'views/survey_question_views.xml', + 'views/survey_input_print_templates.xml', + 'views/survey_portal_templates.xml', + 'views/survey_user_views.xml', + 'views/survey_survey_views.xml' + ], + 'assets': { + 'web.assets_frontend': [ + 'https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css', + 'https://cdn.jsdelivr.net/npm/flatpickr@4.6.3/dist/flatpickr.min.js', + 'enhanced_survey_management/static/src/js/survey_form.js', + 'enhanced_survey_management/static/src/js/survey_submit.js', + ], + }, + 'images': [ + 'static/description/banner.png', + 'static/description/icon.png', + ], + 'license': 'OPL-1', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/enhanced_survey_management/controllers/__init__.py b/enhanced_survey_management/controllers/__init__.py new file mode 100644 index 000000000..dabc5f027 --- /dev/null +++ b/enhanced_survey_management/controllers/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from . import enhanced_survey_management +from . import website_visibility +from . import xlsx_main diff --git a/enhanced_survey_management/controllers/enhanced_survey_management.py b/enhanced_survey_management/controllers/enhanced_survey_management.py new file mode 100644 index 000000000..8707c3ebe --- /dev/null +++ b/enhanced_survey_management/controllers/enhanced_survey_management.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo.addons.portal.controllers.portal import CustomerPortal +from odoo import http +from odoo.http import request + + +class SurveyAnswerPortal(CustomerPortal): + """ Inherited CustomerPortal to add new portal view""" + + def _prepare_home_portal_values(self, counters): + """ Function : Prepare portal values for attended survey count + @return : Survey counts + """ + values = super(SurveyAnswerPortal, self)._prepare_home_portal_values( + counters) + if 'survey_count' in counters: + values['survey_count'] = request.env[ + 'survey.survey'].sudo().search_count([ + ('user_id', '=', request.uid), ('visibility', '=', True)]) + return values + + +class SurveyPortalView(http.Controller): + """ Survey portal controller """ + + @http.route('/my/survey/ans', type='http', auth="public", + website=True) + def portal_my_survey(self): + """ Controller to send survey data to portal """ + survey = request.env['survey.survey'].sudo().search( + [('user_id', '=', request.uid)]) + values = { + 'survey_list': [{'id': rec.id, + 'survey': rec.title, + 'user_id': rec.user_id.name, + 'email': rec.user_id.partner_id.email, + 'status': rec.session_state + } for rec in survey if rec.visibility], + 'page_name': 'survey' + } + return request.render( + """enhanced_survey_management.portal_survey_result""", values) + + @http.route('/my/survey/', type="http", auth="public", + website=True) + def survey_view(self, survey_id): + """ Controller function to send specific survey data """ + question_list = [] + survey_questions_line = request.env[ + 'survey.user_input.line'].sudo().search([ + ('survey_id', '=', survey_id)]) + survey = request.env['survey.survey'].sudo().browse(survey_id) + for res in survey_questions_line: + question_list.append({ + 'id': res.question_id.id, + 'questions': res.question_id.title, + 'section': res.create_date, + 'question_type': res.question_id.question_type, + 'score': res.answer_score, + 'answer': res.display_name, + }) + values = { + 'survey_questions': question_list, + 'survey': survey.title, + 'survey_date': survey.create_date, + 'name': survey.user_id.partner_id.name, + 'email': survey.user_id.partner_id.email, + 'access_token': survey.access_token, + 'page_name': 'survey', + 'survey_boolean': True + } + return request.render( + "enhanced_survey_management.portal_survey_result_view", values) + + +class SurveyLoadContent(http.Controller): + """Controller to load country and state to the survey""" + + @http.route('/survey/load_country', type="json", auth="public", + website=True, csrf=False) + def load_country(self): + """Function to return country names for question type country""" + country_ids = request.env['res.country'].sudo().search([]) + return { + 'id': country_ids.mapped('id'), + 'name': country_ids.mapped('name'), + } + + @http.route('/survey/load_states', type="json", auth="public", + website=True, + csrf=False) + def load_states(self, **kwargs): + """Function to return state names based on country""" + state_ids = request.env['res.country.state'].sudo().search([ + ('country_id.name', '=', kwargs['country_id']) + ]) + return { + 'id': state_ids.mapped('id'), + 'name': state_ids.mapped('name'), + } diff --git a/enhanced_survey_management/controllers/website_visibility.py b/enhanced_survey_management/controllers/website_visibility.py new file mode 100644 index 000000000..9675437da --- /dev/null +++ b/enhanced_survey_management/controllers/website_visibility.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import http +from odoo.http import request + + +class WebsiteView(http.Controller): + """Inherited http.Controller to add custom route""" + + @http.route('/public/survey', type='http', auth="public", + website=True) + def public_user_access(self): + """ Controller function to access survey from website """ + survey = request.env['survey.survey'].sudo().search( + [('access_mode', '=', 'website')]) + values = { + 'survey_list': [{ + 'title': rec.title, + 'attempts': rec.attempts_limit, + 'date': rec.create_date, + 'access_token': rec.access_token + } for rec in survey], + } + return request.render("enhanced_survey_management.survey_visibility", + values) diff --git a/enhanced_survey_management/controllers/xlsx_main.py b/enhanced_survey_management/controllers/xlsx_main.py new file mode 100644 index 000000000..becb77c75 --- /dev/null +++ b/enhanced_survey_management/controllers/xlsx_main.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +import io +from odoo import http +from odoo.http import content_disposition, request +from odoo.tools.misc import xlsxwriter + + +class XlsxReportController(http.Controller): + """Inherited http.Controller to add custom route""" + + @http.route('/xlsx_report/', + type='http', auth='user', csrf=False) + def get_report_xlsx(self, survey_id=None, **args): + """ Function to create and print XLSX report""" + user_input_ids = request.env['survey.user_input'].search( + [("survey_id", '=', survey_id.id)]) + answers, title = [], '' + for rec in user_input_ids: + for res in rec: + for new in res.user_input_line_ids: + new_dt = str(rec.create_date).split('.') + answers.append([rec.id, rec.nickname, new_dt[0], + new.question_id.title, new.display_name]) + answers.reverse() + response = request.make_response( + None, + headers=[ + ('Content-Type', 'application/vnd.ms-excel'), + ('Content-Disposition', + content_disposition(survey_id.title + '.xlsx')) + ] + ) + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + sheet = workbook.add_worksheet() + sheet.set_column(1, 0, 25) + sheet.set_column(2, 0, 25) + sheet.set_column(3, 3, 50) + cell_format = workbook.add_format( + {'font_size': '12px', 'align': 'center'}) + head = workbook.add_format( + {'align': 'center', 'bold': True, 'font_size': '20px'}) + sub_title = workbook.add_format( + {'align': 'right', 'bold': True, 'font_size': '12px'}) + sub_title_content = workbook.add_format( + {'align': 'left', 'bold': True, 'font_size': '12px'}) + txt = workbook.add_format({'font_size': '10px'}) + sheet.merge_range('A2:D3', 'SURVEY MANAGEMENT REPORT', head) + sheet.write('A4', 'Title :', sub_title) + sheet.merge_range('B4:C4', survey_id.title, sub_title_content) + sheet.merge_range('A6:A7', 'Partner', cell_format) + sheet.merge_range('B6:B7', 'Submission Date & Time', cell_format) + sheet.merge_range('C6:C7', 'Question', cell_format) + sheet.merge_range('D6:D7', 'Answer', cell_format) + row = 7 + column = 0 + for rec in answers: + sheet.write(row, column, rec[1], txt) + sheet.write(row, column + 1, rec[2], txt) + sheet.write(row, column + 2, rec[3], txt) + sheet.write(row, column + 3, rec[4], txt) + row = row + 1 + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() + return response diff --git a/enhanced_survey_management/data/enhanced_survey_management_data.xml b/enhanced_survey_management/data/enhanced_survey_management_data.xml new file mode 100644 index 000000000..46f1226b2 --- /dev/null +++ b/enhanced_survey_management/data/enhanced_survey_management_data.xml @@ -0,0 +1,10 @@ + + + + + Survey + /public/survey + + 80 + + diff --git a/enhanced_survey_management/doc/RELEASE_NOTES.md b/enhanced_survey_management/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..08b7c89bd --- /dev/null +++ b/enhanced_survey_management/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 04.07.2023 +#### Version 15.0.1.0.0 +#### ADD + +- Initial commit for Enhanced Survey Management diff --git a/enhanced_survey_management/models/__init__.py b/enhanced_survey_management/models/__init__.py new file mode 100644 index 000000000..6f550516c --- /dev/null +++ b/enhanced_survey_management/models/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from . import question_selection +from . import survey_question +from . import survey_question_answer +from . import survey_survey +from . import survey_user_input +from . import survey_user_input_line diff --git a/enhanced_survey_management/models/question_selection.py b/enhanced_survey_management/models/question_selection.py new file mode 100644 index 000000000..6e9108326 --- /dev/null +++ b/enhanced_survey_management/models/question_selection.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import fields, models + + +class QuestionSelection(models.Model): + """Model to store options for selection type question""" + _name = 'question.selection' + _description = 'Selection Question' + + name = fields.Char(string='Name', help="Selection value.") + question_id = fields.Many2one('survey.question', + string="Question", + help="Field to store " + "question id in selection type.") diff --git a/enhanced_survey_management/models/survey_question.py b/enhanced_survey_management/models/survey_question.py new file mode 100644 index 000000000..b446044d4 --- /dev/null +++ b/enhanced_survey_management/models/survey_question.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class SurveyQuestion(models.Model): + """ Inherited survey.question to add custom question type""" + _inherit = 'survey.question' + + selection_ids = fields.One2many('question.selection', + 'question_id', + string='Select', + help="""Field used to create selection type + questions""") + question_type = fields.Selection(selection_add=[ + ('time', 'Time'), + ('month', 'Month'), + ('name', 'Name'), + ('address', 'Address'), + ('email', 'Email'), + ('password', 'Password'), + ('qr', 'Qrcode'), + ('url', 'URL'), + ('week', 'Week'), + ('color', 'Color'), + ('range', 'Range'), + ('many2one', 'Many2one'), + ('file', 'Upload File'), + ('date', 'Date'), + ('many2many', 'Many2many'), + ('selection', 'Selection'), + ('barcode', 'Barcode') + ], help="Survey supported question types") + matrix_subtype = fields.Selection( + selection_add=[('custom', 'Custom Matrix')], + help="""Matrix selection type question""") + model_id = fields.Many2one('ir.model', string='Model', + domain=[('transient', '=', False)], + help="Many2one type question") + range_min = fields.Integer(string='Min', + help='Minimum range,range type question') + range_max = fields.Integer(string='Max', + help='Maximum range,range type question') + qrcode = fields.Text(string='Qrcode', + help='Show qrcode in survey') + qrcode_png = fields.Binary(string='Qrcode PNG', help="Qrcode PNG") + barcode = fields.Char(string='Barcode', help="Barcode number") + barcode_png = fields.Binary(string='Barcode PNG', + help="Saves barcode png file") + + @api.constrains('barcode') + def _check_barcode(self): + """Constraint to ensure barcode is exactly 12 digits.""" + for record in self: + if record.barcode: + if len(record.barcode) != 12: + raise ValidationError( + _("The barcode must be exactly 12 characters long.") + ) + if not record.barcode.isdigit(): + raise ValidationError( + _("The barcode must contain only digits.")) + + def get_selection_values(self): + """Function return options for selection type question""" + return self.selection_ids + + def prepare_model_id(self, model): + """Function to return options for many2one question""" + if model: + model_data = self.env[model.model].sudo().search([]) + return [rec.read([model_data._rec_name])[0] for rec in model_data] + model_data = self.env[self.model_id.model].sudo().search([]) + return [rec.read([model_data._rec_name])[0] for rec in model_data] diff --git a/enhanced_survey_management/models/survey_question_answer.py b/enhanced_survey_management/models/survey_question_answer.py new file mode 100644 index 000000000..f556485f1 --- /dev/null +++ b/enhanced_survey_management/models/survey_question_answer.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import fields, models + + +class SurveyQuestionAnswer(models.Model): + """Inherit question answer model to add new answer type and model field""" + _inherit = 'survey.question.answer' + + answer_type = fields.Selection([ + ('text_box', 'Multiple Lines Text Box'), + ('char_box', 'Single Line Text Box'), + ('numerical_box', 'Numerical Value'), + ('date', 'Date'), + ('datetime', 'Datetime'), + ('time', 'Time'), + ('email', 'Email'), + ('password', 'Password'), + ('range', 'Range'), + ('month', 'Month'), + ('url', 'URL'), + ('week', 'Week'), + ('color', 'Color'), + ('many2one', 'Many2one')], help="Answer type", + string='Answer Type', readonly=False, store=True) + model_id = fields.Many2one('ir.model', string='Model', + domain=[('transient', '=', False)], + help="Select model for getting it's" + " values in survey") diff --git a/enhanced_survey_management/models/survey_survey.py b/enhanced_survey_management/models/survey_survey.py new file mode 100755 index 000000000..085a0ee2b --- /dev/null +++ b/enhanced_survey_management/models/survey_survey.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import fields, models + + +class Survey(models.Model): + """Inherited model to change survey visibility""" + _inherit = 'survey.survey' + + access_mode = fields.Selection(selection_add=[ + ('website', 'website')], ondelete={'website': 'cascade'}) + visibility = fields.Boolean(string='Portal Visibility', + help="""Portal visibility of this survey""") + + def action_answer_report_download(self): + """Function to generate report values""" + return { + 'type': 'ir.actions.act_url', + 'url': f'/xlsx_report/{self.id}' + } diff --git a/enhanced_survey_management/models/survey_user_input.py b/enhanced_survey_management/models/survey_user_input.py new file mode 100644 index 000000000..2d6009189 --- /dev/null +++ b/enhanced_survey_management/models/survey_user_input.py @@ -0,0 +1,135 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +import json +from odoo import models + + +class SurveyUserInput(models.Model): + """Inherited user input to make acceptable for custom question""" + _inherit = "survey.user_input" + + def save_lines(self, question, answer, comment=None): + """Function to save custom answers""" + old_answers = self.env['survey.user_input.line'].search([ + ('user_input_id', '=', self.id), + ('question_id', '=', question.id), ]) + if question.question_type in ['password', 'range', 'time', 'url', + 'email', 'range', 'many2many', + 'file', 'many2one', 'week', 'color', + 'month', 'address', 'name', 'selection', + 'file', 'qr', 'barcode', 'signature']: + res = self._save_user_answers(question, old_answers, answer) + elif question.matrix_subtype == 'custom': + res = self._save_user_answers(question, old_answers, answer) + else: + res = super().save_lines(question, answer, comment) + return res + + def _save_user_answers(self, question, user_input_line, answer): + """Function to save custom answers""" + vals = (self._get_user_answers( + question, answer, question.question_type)) + if user_input_line: + user_input_line.write(vals) + else: + user_input_line = self.env['survey.user_input.line'].create(vals) + return user_input_line + + def _get_user_answers(self, question, answer, answer_type): + """Function to save custom answers""" + vals = {'user_input_id': self.id, 'question_id': question.id, + 'skipped': False, 'answer_type': answer_type, + } + if not answer or (isinstance(answer, str) and not answer.strip()): + vals.update(answer_type=None, skipped=True) + return vals + if question.question_type == 'time': + vals['value_time'] = float(answer.replace(":", ".")) + elif question.question_type == 'url': + vals['value_url'] = answer + elif question.question_type == 'password': + vals['value_password'] = answer + elif question.question_type == 'email': + vals['value_email'] = answer + elif question.question_type == 'range': + vals['value_range'] = answer + elif question.question_type == 'many2one': + vals['value_many2one'] = answer[0] + vals['value_many2one_option'] = answer[1] + elif question.question_type == 'many2many': + vals['value_many2many'] = answer + elif question.question_type == 'week': + vals['value_week'] = answer + elif question.question_type == 'color': + vals['value_color'] = answer + elif question.question_type == 'date': + vals['value_month'] = answer + elif question.question_type == 'matrix' \ + and question.matrix_subtype == 'custom': + vals['value_matrix'] = json.dumps(answer) + elif question.question_type == 'address': + vals['value_address'] = json.dumps(answer) + elif question.question_type == 'qr': + vals['value_qr'] = json.dumps(answer) + elif question.question_type == 'barcode': + vals['value_barcode'] = json.dumps(answer) + elif question.question_type == 'name': + vals['value_name'] = json.dumps(answer) + elif question.question_type == 'selection': + vals['value_selection'] = answer + elif question.question_type == 'file': + attachment = self.env['ir.attachment'].create({ + 'name': str(answer[1]), 'datas': answer[0], 'type': 'binary' + }) + vals['value_file'] = int(attachment.id if attachment else False) + vals['filename'] = attachment.name if attachment else False + return vals + + def _save_line_matrix(self, question, old_answers, answers, comment): + """Function to save custom matrix""" + if question.matrix_subtype == 'custom': + self._save_line(question, answers) + else: + vals_list = [] + if not answers and question.matrix_row_ids: + # add a False answer to force saving a skipped line + # this will make this question correctly considered as + # skipped in statistics + answers = {question.matrix_row_ids[0].id: [False]} + if answers: + for row_key, row_answer in answers.items(): + for answer in row_answer: + vals = self._get_line_answer_values(question, answer, + 'suggestion') + vals['matrix_row_id'] = int(row_key) + vals_list.append(vals.copy()) + if comment: + vals_list.append( + self._get_line_comment_values(question, comment)) + old_answers.sudo().unlink() + return self.env['survey.user_input.line'].create(vals_list) + + def _save_line_selection_answer(self, question, answer): + """Function to save selection type answers""" + vals = self._get_line_answer_values(question, answer, + question.question_type) + return self.env['survey.user_input.line'].create(vals) diff --git a/enhanced_survey_management/models/survey_user_input_line.py b/enhanced_survey_management/models/survey_user_input_line.py new file mode 100644 index 000000000..8ac330a7a --- /dev/null +++ b/enhanced_survey_management/models/survey_user_input_line.py @@ -0,0 +1,169 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +import json +import textwrap +from datetime import datetime +from odoo import api, fields, models, _ + + +class SurveyUserInputLine(models.Model): + """Inherited user input line to add custom answer types """ + _inherit = 'survey.user_input.line' + + answer_type = fields.Selection( + selection_add=[('url', 'URL'), + ('many2one', 'Many2one'), + ('many2many', 'Many2many'), + ('week', 'Week'), + ('time', 'Time'), + ('color', 'Color'), + ('email', 'Email'), + ('month', 'Month'), + ('name', 'Name'), + ('matrix', 'Matrix'), + ('address', 'Address'), + ('selection', 'Selection'), + ('time', 'Time'), + ('password', 'Password'), + ('email', 'Email'), + ('range', 'Range'), + ('file', 'File'), + ('qr', 'Qrcode'), + ('barcode', 'Barcode')], help="Custom answer types") + value_url = fields.Char(string='User URL', + help='Answer question type : URL') + value_email = fields.Char(string='User Email', + help="Answer question type : Email") + value_week = fields.Char(string='User Week', + help="Answer question type : Week") + value_color = fields.Char(string='User Color', + help="Answer question type : Color") + value_many2one = fields.Char(string='Survey Many2one', + help="Answer question type : Many2one") + value_many2one_option = fields.Char(string='Many2one selected', + help="Answer question type : Selected") + value_many2many = fields.Char(string='Survey Many2many', + help="Answer question type : Many2many") + value_time = fields.Float(string='Time Value', + help="Answer question type : Time") + value_matrix = fields.Text(string='Custom Matrix Values', + help="Answer question type : Custom Matrix") + value_selection = fields.Char(string='User Selection', + help="Answer question type : Selection") + value_password = fields.Char(string='Password Value', + help="Answer question type : Password") + value_range = fields.Char(string='Range Value', + help="Answer question type:Range") + value_file = fields.Many2one('ir.attachment', + string='Survey file', + help="Answer question type : Attachment") + filename = fields.Char(string='File', help="Attachment file name") + file_data = fields.Binary(string='File Data', + help="Attachment file data", + related="value_file.datas") + value_month = fields.Char(string='Month Value', + help="Answer question type : Month") + value_address = fields.Text(string='Address Value', + help="Answer question type : Address") + value_name = fields.Text(string='Name Values', + help="Answer question type : Full name") + value_qr = fields.Char(string='Qr Values', + help="Answer question type : QRcode") + value_barcode = fields.Char(string='Barcode Values', + help="Answer question type : Barcode") + + def get_value_time(self): + """Function to return answer for question type time """ + if self.value_time: + return datetime.strptime(str(self.value_time).replace('.', ':'), + "%H:%M").strftime("%H:%M") + return None + + + def get_value_address(self, field): + """Function to return answer for question type address""" + data = json.loads(self.value_address) + if data: + question_id = self.question_id.id + return data[f'{question_id}-{field}'] + return '' + + def get_value_matrix(self, item): + """Function to return answer for custom matrix""" + data = json.loads(self.value_matrix) + if data: + question_id = self.question_id.id + return data[f'{item}-{question_id}'] + return None + + def get_value_name(self, field): + """Function to return answer for Full name""" + data = json.loads(self.value_name) + if data: + question_id = self.question_id.id + return data[f'{question_id}-{field}'] + return '' + + @api.depends('answer_type') + def _compute_display_name(self): + """Override compute function to add custom answer display""" + for line in self: + # Mapping of answer_type to corresponding value + answer_type_mapping = { + 'char_box': line.value_char_box, + 'text_box': textwrap.shorten(line.value_text_box, width=50, + placeholder=" [...]") if line.value_text_box else None, + 'numerical_box': line.value_numerical_box, + 'time': line.value_time, + 'month': line.value_month, + 'address': line.value_address, + 'name': line.value_name, + 'url': line.value_url, + 'many2one': line.value_many2one_option, + 'many2many': line.value_many2many, + 'week': line.value_week, + 'email': line.value_email, + 'range': line.value_range, + 'matrix': line.value_matrix, + 'password': line.value_password, + 'signature': line.value_signature, + 'color': line.value_color, + 'selection': line.value_selection, + 'barcode': line.value_barcode, + 'qr': line.value_qr, + 'file': line.filename, + 'date': fields.Date.to_string( + line.value_date) if line.value_date else None, + 'datetime': fields.Datetime.to_string( + line.value_datetime) if line.value_datetime else None, + } + + # Special case for 'suggestion' + if line.answer_type == 'suggestion': + line.display_name = ( + f"{line.suggested_answer_id.value}: {line.matrix_row_id.value}" + if line.matrix_row_id else line.suggested_answer_id.value + ) + else: + # Fetch value from mapping or default to 'Skipped' + line.display_name = answer_type_mapping.get(line.answer_type, + None) or _('Skipped') diff --git a/enhanced_survey_management/security/ir.model.access.csv b/enhanced_survey_management/security/ir.model.access.csv new file mode 100644 index 000000000..415c14fbf --- /dev/null +++ b/enhanced_survey_management/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_question_selection,access.question.selection,model_question_selection,base.group_user,1,1,1,1 diff --git a/enhanced_survey_management/static/description/assets/cybro-icon.png b/enhanced_survey_management/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/enhanced_survey_management/static/description/assets/cybro-icon.png differ diff --git a/enhanced_survey_management/static/description/assets/cybro-odoo.png b/enhanced_survey_management/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/cybro-odoo.png differ diff --git a/enhanced_survey_management/static/description/assets/hero.jpg b/enhanced_survey_management/static/description/assets/hero.jpg new file mode 100644 index 000000000..12caa6c33 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/hero.jpg differ diff --git a/enhanced_survey_management/static/description/assets/icons/01.png b/enhanced_survey_management/static/description/assets/icons/01.png new file mode 100644 index 000000000..40940ce93 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/01.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/02.png b/enhanced_survey_management/static/description/assets/icons/02.png new file mode 100644 index 000000000..bb9fecc77 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/02.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/XLSX-download.png b/enhanced_survey_management/static/description/assets/icons/XLSX-download.png new file mode 100644 index 000000000..015b1b07a Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/XLSX-download.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/check.png b/enhanced_survey_management/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/check.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/chevron.png b/enhanced_survey_management/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/chevron.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/cogs.png b/enhanced_survey_management/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/cogs.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/consultation.png b/enhanced_survey_management/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/consultation.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/down.svg b/enhanced_survey_management/static/description/assets/icons/down.svg new file mode 100644 index 000000000..0759a8f5e --- /dev/null +++ b/enhanced_survey_management/static/description/assets/icons/down.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/enhanced_survey_management/static/description/assets/icons/ecom-black.png b/enhanced_survey_management/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/ecom-black.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/education-black.png b/enhanced_survey_management/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/education-black.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/faq.png b/enhanced_survey_management/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/faq.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/feature.png b/enhanced_survey_management/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/feature.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/hotel-black.png b/enhanced_survey_management/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/hotel-black.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/license.png b/enhanced_survey_management/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/license.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/lifebuoy.png b/enhanced_survey_management/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/lifebuoy.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/logo.png b/enhanced_survey_management/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/logo.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/manufacturing-black.png b/enhanced_survey_management/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/manufacturing-black.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/pdf-download.png b/enhanced_survey_management/static/description/assets/icons/pdf-download.png new file mode 100644 index 000000000..c1e8fba36 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/pdf-download.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/pos-black.png b/enhanced_survey_management/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/pos-black.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/print-pdf.png b/enhanced_survey_management/static/description/assets/icons/print-pdf.png new file mode 100644 index 000000000..7ed4ec8c7 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/print-pdf.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/puzzle.png b/enhanced_survey_management/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/puzzle.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/restaurant-black.png b/enhanced_survey_management/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/restaurant-black.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/screenshot.png b/enhanced_survey_management/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/screenshot.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/service-black.png b/enhanced_survey_management/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/service-black.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/support.png b/enhanced_survey_management/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/support.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/test-2.png b/enhanced_survey_management/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..08022c474 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/test-2.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/trading-black.png b/enhanced_survey_management/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/trading-black.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/training.png b/enhanced_survey_management/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/training.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/update.png b/enhanced_survey_management/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/update.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/user.png b/enhanced_survey_management/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/user.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/video.png b/enhanced_survey_management/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/video.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/web-users.png b/enhanced_survey_management/static/description/assets/icons/web-users.png new file mode 100644 index 000000000..45f887c54 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/web-users.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/whatsapp.png b/enhanced_survey_management/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/whatsapp.png differ diff --git a/enhanced_survey_management/static/description/assets/icons/wrench.png b/enhanced_survey_management/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/enhanced_survey_management/static/description/assets/icons/wrench.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/categories.png b/enhanced_survey_management/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/categories.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/check-box.png b/enhanced_survey_management/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/check-box.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/compass.png b/enhanced_survey_management/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/compass.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/corporate.png b/enhanced_survey_management/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/corporate.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/customer-support.png b/enhanced_survey_management/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/customer-support.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/cybrosys-logo.png b/enhanced_survey_management/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/cybrosys-logo.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/features.png b/enhanced_survey_management/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/features.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/logo.png b/enhanced_survey_management/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/logo.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/pictures.png b/enhanced_survey_management/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/pictures.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/pie-chart.png b/enhanced_survey_management/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/pie-chart.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/right-arrow.png b/enhanced_survey_management/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/right-arrow.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/star.png b/enhanced_survey_management/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/star.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/support.png b/enhanced_survey_management/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/support.png differ diff --git a/enhanced_survey_management/static/description/assets/misc/whatsapp.png b/enhanced_survey_management/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/misc/whatsapp.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/1.png b/enhanced_survey_management/static/description/assets/modules/1.png new file mode 100644 index 000000000..958601ec8 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/1.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/2.png b/enhanced_survey_management/static/description/assets/modules/2.png new file mode 100644 index 000000000..773a67300 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/2.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/3.png b/enhanced_survey_management/static/description/assets/modules/3.png new file mode 100644 index 000000000..2a52f4d41 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/3.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/4.jpg b/enhanced_survey_management/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..ed175b076 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/4.jpg differ diff --git a/enhanced_survey_management/static/description/assets/modules/4.png b/enhanced_survey_management/static/description/assets/modules/4.png new file mode 100644 index 000000000..923a3beea Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/4.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/5.gif b/enhanced_survey_management/static/description/assets/modules/5.gif new file mode 100755 index 000000000..2a5f8e659 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/5.gif differ diff --git a/enhanced_survey_management/static/description/assets/modules/5.png b/enhanced_survey_management/static/description/assets/modules/5.png new file mode 100644 index 000000000..dacb9817d Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/5.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/6.png b/enhanced_survey_management/static/description/assets/modules/6.png new file mode 100644 index 000000000..be55ec3ed Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/6.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/banner.png b/enhanced_survey_management/static/description/assets/modules/banner.png new file mode 100644 index 000000000..e339ff769 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/banner.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/budget_image.png b/enhanced_survey_management/static/description/assets/modules/budget_image.png new file mode 100755 index 000000000..b50130c7d Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/budget_image.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/credit_image.png b/enhanced_survey_management/static/description/assets/modules/credit_image.png new file mode 100755 index 000000000..3ad04ecfd Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/credit_image.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/crm.png b/enhanced_survey_management/static/description/assets/modules/crm.png new file mode 100644 index 000000000..25ed3e0b6 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/crm.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/employee.png b/enhanced_survey_management/static/description/assets/modules/employee.png new file mode 100644 index 000000000..c0aa245ce Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/employee.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/employee_image.png b/enhanced_survey_management/static/description/assets/modules/employee_image.png new file mode 100755 index 000000000..30ad58232 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/employee_image.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/export_image.png b/enhanced_survey_management/static/description/assets/modules/export_image.png new file mode 100755 index 000000000..492980ad0 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/export_image.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/gantt_image.png b/enhanced_survey_management/static/description/assets/modules/gantt_image.png new file mode 100755 index 000000000..1ae7cfe3b Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/gantt_image.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/hr.png b/enhanced_survey_management/static/description/assets/modules/hr.png new file mode 100644 index 000000000..ed11bd818 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/hr.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/quotation_image.png b/enhanced_survey_management/static/description/assets/modules/quotation_image.png new file mode 100755 index 000000000..499b1a72f Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/quotation_image.png differ diff --git a/enhanced_survey_management/static/description/assets/modules/sales.png b/enhanced_survey_management/static/description/assets/modules/sales.png new file mode 100644 index 000000000..8658f1826 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/modules/sales.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/1.png b/enhanced_survey_management/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..914ef0989 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/1.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/10.png b/enhanced_survey_management/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..8db610dfb Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/10.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/11.png b/enhanced_survey_management/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..1ca911cd8 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/11.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/12.png b/enhanced_survey_management/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..247dc7983 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/12.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/13.png b/enhanced_survey_management/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..44a4cdd26 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/13.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/14.png b/enhanced_survey_management/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..be8083b49 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/14.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/15.png b/enhanced_survey_management/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..4796043d0 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/15.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/16.png b/enhanced_survey_management/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..6000cbc97 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/16.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/17.png b/enhanced_survey_management/static/description/assets/screenshots/17.png new file mode 100644 index 000000000..d37b22ee2 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/17.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/18.png b/enhanced_survey_management/static/description/assets/screenshots/18.png new file mode 100644 index 000000000..913b562e6 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/18.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/19.png b/enhanced_survey_management/static/description/assets/screenshots/19.png new file mode 100644 index 000000000..b48b19644 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/19.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/2.png b/enhanced_survey_management/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..e16432701 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/2.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/21.png b/enhanced_survey_management/static/description/assets/screenshots/21.png new file mode 100644 index 000000000..3315f8949 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/21.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/22.png b/enhanced_survey_management/static/description/assets/screenshots/22.png new file mode 100644 index 000000000..7ea5a1133 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/22.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/23.png b/enhanced_survey_management/static/description/assets/screenshots/23.png new file mode 100644 index 000000000..dbdb13f68 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/23.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/24.png b/enhanced_survey_management/static/description/assets/screenshots/24.png new file mode 100644 index 000000000..13ac49aad Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/24.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/25.png b/enhanced_survey_management/static/description/assets/screenshots/25.png new file mode 100644 index 000000000..b605c25bd Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/25.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/26.png b/enhanced_survey_management/static/description/assets/screenshots/26.png new file mode 100644 index 000000000..8e14cce81 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/26.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/27.png b/enhanced_survey_management/static/description/assets/screenshots/27.png new file mode 100644 index 000000000..e7a9137b2 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/27.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/28.png b/enhanced_survey_management/static/description/assets/screenshots/28.png new file mode 100644 index 000000000..df3e1532e Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/28.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/29.png b/enhanced_survey_management/static/description/assets/screenshots/29.png new file mode 100644 index 000000000..c4049c6d7 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/29.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/3.png b/enhanced_survey_management/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..a432f93f5 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/3.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/30.png b/enhanced_survey_management/static/description/assets/screenshots/30.png new file mode 100644 index 000000000..4c22e524f Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/30.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/31.png b/enhanced_survey_management/static/description/assets/screenshots/31.png new file mode 100644 index 000000000..4314805c5 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/31.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/32.png b/enhanced_survey_management/static/description/assets/screenshots/32.png new file mode 100644 index 000000000..b122591ad Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/32.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/33.png b/enhanced_survey_management/static/description/assets/screenshots/33.png new file mode 100644 index 000000000..fa2038f19 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/33.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/34.png b/enhanced_survey_management/static/description/assets/screenshots/34.png new file mode 100644 index 000000000..e478e4dd1 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/34.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/35.png b/enhanced_survey_management/static/description/assets/screenshots/35.png new file mode 100644 index 000000000..faeb9c260 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/35.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/36.png b/enhanced_survey_management/static/description/assets/screenshots/36.png new file mode 100644 index 000000000..e6372e59e Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/36.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/37.png b/enhanced_survey_management/static/description/assets/screenshots/37.png new file mode 100644 index 000000000..00faac3de Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/37.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/38.png b/enhanced_survey_management/static/description/assets/screenshots/38.png new file mode 100644 index 000000000..fcde1d7dc Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/38.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/5.png b/enhanced_survey_management/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..3a4223ceb Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/5.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/6.png b/enhanced_survey_management/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..1680ea413 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/6.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/7.png b/enhanced_survey_management/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..7aed2d062 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/7.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/8.png b/enhanced_survey_management/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..cc239b622 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/8.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/9.png b/enhanced_survey_management/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..2db9bf711 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/9.png differ diff --git a/enhanced_survey_management/static/description/assets/screenshots/hero.gif b/enhanced_survey_management/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6410a10ce Binary files /dev/null and b/enhanced_survey_management/static/description/assets/screenshots/hero.gif differ diff --git a/enhanced_survey_management/static/description/assets/y18.jpg b/enhanced_survey_management/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/enhanced_survey_management/static/description/assets/y18.jpg differ diff --git a/enhanced_survey_management/static/description/banner.png b/enhanced_survey_management/static/description/banner.png new file mode 100644 index 000000000..6648fb21e Binary files /dev/null and b/enhanced_survey_management/static/description/banner.png differ diff --git a/enhanced_survey_management/static/description/icon.png b/enhanced_survey_management/static/description/icon.png new file mode 100644 index 000000000..e39643ca2 Binary files /dev/null and b/enhanced_survey_management/static/description/icon.png differ diff --git a/enhanced_survey_management/static/description/index.html b/enhanced_survey_management/static/description/index.html new file mode 100644 index 000000000..f9766acc2 --- /dev/null +++ b/enhanced_survey_management/static/description/index.html @@ -0,0 +1,798 @@ +
+
+
+
+ +
+
+
+ Community +
+
+
+
+ Enterprise +
+
+
+
+ Odoo.sh +
+
+
+
+
+ +
+
+
+

+ Enhanced Survey Management +

+

+ Enhance your survey management with new question kinds and + more.

+ +
+
+
+ +
+
+ +
+

+ Explore This + Module

+
+ + + +
+
+ +
+

+ Overview +

+
+
+
+ In odoo we have only few questions types, This app has many additional + question types and can improve the survey answers quality. This App also + have the features like Exporting Answers in XLSX & PDF and many more. +
+
+ + +
+
+ +
+

+ Features +

+
+
+
+
+ + 15+ Custom Fields. +
+
+ + Participation Is Available To Website Users. +
+
+ + User Portal for Survey Answer. +
+
+ + Export Survey Answers in Excel. +
+
+
+
+
+ + +
+
+

+ Screenshots +

+
+
+

+ Time Field +

+

+ Creating survey with question type as 'Time'. +

+ + +
+
+

+ Month Field +

+

+ Creating survey with question type as Month. +

+ +
+ +
+

+ Name Field +

+

+ Creating Survey with question type as Name. +

+ + +
+ +
+

+ Address Field +

+

+ Creating survey with question type as Address. +

+ + +
+ +
+

+ Email Field

+

+ Creating survey with question type as Email. +

+ + +
+ +
+

+ Password Field

+

+ Creating survey with question type as Password. +

+ + +
+ +
+

+ Barcode Field

+

+ Creating survey with question type as Barcode. +

+ + +
+
+

+ QR Code Field

+

+ Creating survey with question type as QR Code.

+ + +
+
+

+ URL Field

+

+ Creating survey with question type as URL.

+ + +
+
+

+ Week Field

+

+ Creating survey with question type as Week. +

+ +
+ +
+

+ Colour Field

+

+ Creating survey with question type as Colour. +

+ + +
+ +
+

+ Range Field

+

+ Creating survey with question type as Range. +

+ + +
+
+

+ Many2One Field

+

+ Creating survey with question type as Many2One. +

+ + +
+
+

+ Many2Many Field

+

+ Creating survey with question type as Many2Many. +

+ + +
+
+

+ Selection Field

+

+ Creating survey with question type as Selection. +

+ + +
+
+

+ Upload File Field

+

+ Creating survey with question type as Upload File. +

+ + +
+
+

+ Custom Matrix

+

+ Creating survey with question type as Custom matrix. +

+ + + +
+
+

+ Access the survey through website.

+

+ Set the Access Mode as website in survey options. +

+ + +
+
+

+ We can access the public & invited surveys from here. +

+ +
+
+ + +
+
+

Suggested Products

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

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/enhanced_survey_management/static/src/js/survey_form.js b/enhanced_survey_management/static/src/js/survey_form.js new file mode 100644 index 000000000..a1e1e087b --- /dev/null +++ b/enhanced_survey_management/static/src/js/survey_form.js @@ -0,0 +1,62 @@ +odoo.define('enhanced_survey_management.survey_form', function (require) { +'use strict'; + console.log('enhanced_survey_management.survey_form') + var rpc = require('web.rpc'); + var publicWidget = require('web.public.widget'); + + var SurveyForm = publicWidget.Widget.extend({ + selector: '.o_survey_form', + events: { + 'focus .o_select_Country': '_onSelectCountry', + 'change .o_select_Country': '_onSelectState', + 'change .o_select_many2many': '_onSelectMany2many', + }, + _onSelectCountry: function(ev){ + /* + * method to load country + */ + var self = this + rpc.query({ + route: '/survey/load_country', + params: {}, + }).then(function (result){ + var count = 0; + self.$el.find(`#${ev.target.id}`).html('') + result['id'].forEach(element => { + self.$el.find(`#${ev.target.id}`).append( + `` + ) + count += 1 + }) + }); + }, + _onSelectState: function(ev){ + /* + * method to load states + */ + var self = this + var country_id = ev.target.value + var question_id = ev.target.dataset.id + rpc.query({ + route: '/survey/load_states', + params: { country_id }, + }).then(function (result){ + var count = 0; + self.$el.find(`#${question_id}-state`).html('') + result['id'].forEach(element => { + self.$el.find(`#${question_id}-state`).append( + `` + ) + count += 1 + }) + }); + }, + _onSelectMany2many: function(ev){ + /* + * method to add selected items to input + */ + this.$el.find('.o_select_many2many_text').val(this.$el.find('.o_select_many2many').val()) + } + }); + publicWidget.registry.SurveyForm = SurveyForm; +}) diff --git a/enhanced_survey_management/static/src/js/survey_submit.js b/enhanced_survey_management/static/src/js/survey_submit.js new file mode 100644 index 000000000..09fabe46b --- /dev/null +++ b/enhanced_survey_management/static/src/js/survey_submit.js @@ -0,0 +1,134 @@ +odoo.define('enhanced_survey_management.survey_submit', function (require){ +'use strict'; + var SurveyFormWidget = require('survey.form'); + /* + * Including custom events to SurveyFormWidget + */ + SurveyFormWidget.include({ + events:{ + 'change .o_file': '_onChangeFile', + 'change .o_survey_form_choice_item': '_onChangeChoiceItem', + 'click .o_survey_matrix_btn': '_onMatrixBtnClick', + 'click button[type="submit"]': '_onSubmit', + }, + _prepareSubmitValues: function (formData, params) { + var self = this; + formData.forEach(function (value, key) { + switch (key) { + case 'csrf_token': + case 'token': + case 'page_id': + case 'question_id': + params[key] = value; + break; + } + }); + // Get all question answers by question type + var address = {} + var names = {} + var matrix = {} + var self = this; + this.$('[data-question-type]').each(function () { + const questionType = $(this).data('questionType'); + const fieldName = this.name; + const fieldValue = this.value; + + switch (questionType) { + case 'text_box': + case 'char_box': + case 'numerical_box': + case 'url': + case 'email': + case 'week': + case 'color': + case 'time': + case 'range': + case 'password': + case 'month': + case 'selection': + params[fieldName] = fieldValue; + break; + + case 'date': + params = self._prepareSubmitDates(params, fieldName, fieldValue, false); + break; + + case 'datetime': + params = self._prepareSubmitDates(params, fieldName, fieldValue, true); + break; + + case 'simple_choice_radio': + case 'multiple_choice': + params = self._prepareSubmitChoices(params, $(this), $(this).data('name')); + break; + + case 'many2one': + params[fieldName] = [fieldValue, $(this).find("option:selected").data('value')]; + break; + + case 'address': + address[fieldName] = fieldValue; + if (fieldName.endsWith('pin')) { + const baseName = fieldName.split("-")[0]; + address[`${baseName}-country`] = self.$el.find(`#${baseName}-country`).val(); + address[`${baseName}-state`] = self.$el.find(`#${baseName}-state`).val(); + params[baseName] = address; + address = {}; + } + break; + + case 'custom': + if (fieldName === 'matrix-end') { + params[this.id] = matrix; + } else if ($(this).attr('id') === 'select' && fieldName) { + matrix[fieldName] = $(this).find("option:selected").data('value'); + } else if ($(this).attr('id') !== 'select' && fieldName) { + matrix[fieldName] = fieldValue; + } + break; + + case 'matrix': + params = self._prepareSubmitAnswersMatrix(params, $(this)); + break; + + case 'name': + names[fieldName] = fieldValue; + if (fieldName.endsWith('last')) { + params[fieldName.split("-")[0]] = names; + names = {}; // Clear after use + } + break; + + case 'file': + const file = $(this)[0].files[0]; + if (file) { + params[fieldName] = [$(this).data('file-name'), file.name]; + } + break; + + case 'many2many': + params[fieldName] = self.$el.find(`.${fieldName}`).val(); + break; + } + }); + } + _onChangeFile: function (ev) { + /* + * method to save attachments + */ + const element = this.$(ev.target); + for (var i=0; i < element.length; i++){ + const elements = $(element[i]) + if (element[i].files[0] && elements.data('file') === parseInt(elements.attr('name'))) { + var file_name = element[i].files[0]['name'] + const reader = new FileReader(); + reader.onloadend = () => { + elements.attr('data-file-name', reader.result.split(',')[1]) + elements.attr('data-file', file_name) + }; + reader.readAsDataURL(element[i].files[0]); + } + } + }, + }) +}) diff --git a/enhanced_survey_management/views/survey_input_print_templates.xml b/enhanced_survey_management/views/survey_input_print_templates.xml new file mode 100755 index 000000000..ede4cad12 --- /dev/null +++ b/enhanced_survey_management/views/survey_input_print_templates.xml @@ -0,0 +1,46 @@ + + + + + diff --git a/enhanced_survey_management/views/survey_portal_templates.xml b/enhanced_survey_management/views/survey_portal_templates.xml new file mode 100755 index 000000000..27ddda60a --- /dev/null +++ b/enhanced_survey_management/views/survey_portal_templates.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + diff --git a/enhanced_survey_management/views/survey_question_views.xml b/enhanced_survey_management/views/survey_question_views.xml new file mode 100644 index 000000000..f0858f118 --- /dev/null +++ b/enhanced_survey_management/views/survey_question_views.xml @@ -0,0 +1,198 @@ + + + + survey.question.view.form.inherit.enhanced.survey.management + survey.question + + + + + +
+ Work Start Time +
+   +   --:-- + +
+ +
+ Email +
+   +   ____________ + +
+ +
+ Name one Month +
+   +   ____________ + +
+ +
+ Password +
+   +   ######### + +
+ +
+ Volume +
+ ------ + + + ---- +
+ +
+ Signature +
+   +   _________ + +
+ +
+ Current Address +
+ +     __________ +
         __________ +
+ ___ ___ ___
______ +
+
+ +
+ Your Name +
+   +   ___ ___ ___ + +
+ +
+ URL +
+     ________ + +
+ +
+ Select a week +
+    Week --, --- + +
+ +
+ Pick a color +
+    ________ + +
+ +
+ Scan Qrcode +
+   + + ___________ +
+ +
+ Scan Barcode +
+   + + ___________ +
+ +
+ Upload a file +
+   + + ___________ +
+ +
+ Select from list +
+   + + ___________ +
+ +
+ Select a Product +
+ ___________ +   + +
+ +
+ Select tags +
+ _()_()_()_()_()_ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/enhanced_survey_management/views/survey_survey_views.xml b/enhanced_survey_management/views/survey_survey_views.xml new file mode 100644 index 000000000..88b152a7a --- /dev/null +++ b/enhanced_survey_management/views/survey_survey_views.xml @@ -0,0 +1,23 @@ + + + + + survey.survey.view.form.inherit.enhanced.survey.management + survey.survey + + + + + + + + + +