diff --git a/survey_question_duplicator/README.rst b/survey_question_duplicator/README.rst new file mode 100644 index 000000000..b1c97dbd4 --- /dev/null +++ b/survey_question_duplicator/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Question Duplicator in Survey +============================= +Makes it possible to duplicate existing survey questions to multiple surveys. + +Configuration +============= +* No additional configurations needed + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer:(V14) Mruthul Raj, 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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/survey_question_duplicator/__init__.py b/survey_question_duplicator/__init__.py new file mode 100644 index 000000000..897924944 --- /dev/null +++ b/survey_question_duplicator/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from . import models +from . import wizard diff --git a/survey_question_duplicator/__manifest__.py b/survey_question_duplicator/__manifest__.py new file mode 100644 index 000000000..3fc5f04de --- /dev/null +++ b/survey_question_duplicator/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +{ + 'name': 'Question Duplicator in Survey', + 'version': '14.0.1.0.0', + 'category': 'Marketing', + 'summary': """This module helps to duplicate existing survey questions + to multiple surveys in Survey module.""", + 'description': """In the Survey module, there is no possibility to + duplicate the questions. With the help of this module, users can quickly + and easily add the same question to several surveys. Both the list view and + the form view of the question support duplication. The list view allows + for the selection of several questions for duplication, and the duplicated + questions can then be added to numerous surveys simultaneously.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['survey'], + 'data': [ + 'security/ir.model.access.csv', + 'views/survey_question_views.xml', + 'wizard/survey_selector_views.xml' + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/survey_question_duplicator/doc/RELEASE_NOTES.md b/survey_question_duplicator/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e9efc3c11 --- /dev/null +++ b/survey_question_duplicator/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 19.10.2023 +#### Version 14.0.1.0.0 +##### ADD + +- Initial Commit for Question Duplicator in Survey diff --git a/survey_question_duplicator/models/__init__.py b/survey_question_duplicator/models/__init__.py new file mode 100644 index 000000000..5992337ac --- /dev/null +++ b/survey_question_duplicator/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from . import survey_question diff --git a/survey_question_duplicator/models/survey_question.py b/survey_question_duplicator/models/survey_question.py new file mode 100644 index 000000000..821642555 --- /dev/null +++ b/survey_question_duplicator/models/survey_question.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from odoo import models + + +class SurveyQuestion(models.Model): + """Inherited survey question to include the add_to_survey action""" + _inherit = 'survey.question' + + def action_add_question(self): + """Method for opening the wizard for selecting the surveys""" + return { + 'name': "Add To Survey", + 'view_mode': 'form', + 'res_model': 'survey.selector', + 'type': 'ir.actions.act_window', + 'target': 'new', + 'context': { + 'active_ids': self.ids + } + } diff --git a/survey_question_duplicator/security/ir.model.access.csv b/survey_question_duplicator/security/ir.model.access.csv new file mode 100644 index 000000000..dfe2a43f9 --- /dev/null +++ b/survey_question_duplicator/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_survey_selector_user,access.survey.selector.user,model_survey_selector,base.group_user,1,1,1,1 diff --git a/survey_question_duplicator/static/description/assets/icons/check.png b/survey_question_duplicator/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/check.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/cogs.png b/survey_question_duplicator/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/cogs.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/consultation.png b/survey_question_duplicator/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/consultation.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/ecom-black.png b/survey_question_duplicator/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/ecom-black.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/education-black.png b/survey_question_duplicator/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/education-black.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/hotel-black.png b/survey_question_duplicator/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/hotel-black.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/license.png b/survey_question_duplicator/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/license.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/lifebuoy.png b/survey_question_duplicator/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/lifebuoy.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/logo.png b/survey_question_duplicator/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/logo.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/manufacturing-black.png b/survey_question_duplicator/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/manufacturing-black.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/pos-black.png b/survey_question_duplicator/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/pos-black.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/puzzle.png b/survey_question_duplicator/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/puzzle.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/restaurant-black.png b/survey_question_duplicator/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/restaurant-black.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/service-black.png b/survey_question_duplicator/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/service-black.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/trading-black.png b/survey_question_duplicator/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/trading-black.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/training.png b/survey_question_duplicator/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/training.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/update.png b/survey_question_duplicator/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/update.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/user.png b/survey_question_duplicator/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/user.png differ diff --git a/survey_question_duplicator/static/description/assets/icons/wrench.png b/survey_question_duplicator/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/survey_question_duplicator/static/description/assets/icons/wrench.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/categories.png b/survey_question_duplicator/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/categories.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/check-box.png b/survey_question_duplicator/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/check-box.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/compass.png b/survey_question_duplicator/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/compass.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/corporate.png b/survey_question_duplicator/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/corporate.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/customer-support.png b/survey_question_duplicator/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/customer-support.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/cybrosys-logo.png b/survey_question_duplicator/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/cybrosys-logo.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/features.png b/survey_question_duplicator/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/features.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/logo.png b/survey_question_duplicator/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/logo.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/pictures.png b/survey_question_duplicator/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/pictures.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/pie-chart.png b/survey_question_duplicator/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/pie-chart.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/right-arrow.png b/survey_question_duplicator/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/right-arrow.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/star.png b/survey_question_duplicator/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/star.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/support.png b/survey_question_duplicator/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/support.png differ diff --git a/survey_question_duplicator/static/description/assets/misc/whatsapp.png b/survey_question_duplicator/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/misc/whatsapp.png differ diff --git a/survey_question_duplicator/static/description/assets/modules/1.png b/survey_question_duplicator/static/description/assets/modules/1.png new file mode 100644 index 000000000..4bd57c098 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/modules/1.png differ diff --git a/survey_question_duplicator/static/description/assets/modules/2.png b/survey_question_duplicator/static/description/assets/modules/2.png new file mode 100644 index 000000000..4be2248a4 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/modules/2.png differ diff --git a/survey_question_duplicator/static/description/assets/modules/3.gif b/survey_question_duplicator/static/description/assets/modules/3.gif new file mode 100644 index 000000000..69bf230e7 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/modules/3.gif differ diff --git a/survey_question_duplicator/static/description/assets/modules/4.png b/survey_question_duplicator/static/description/assets/modules/4.png new file mode 100644 index 000000000..d83e4849e Binary files /dev/null and b/survey_question_duplicator/static/description/assets/modules/4.png differ diff --git a/survey_question_duplicator/static/description/assets/modules/5.png b/survey_question_duplicator/static/description/assets/modules/5.png new file mode 100644 index 000000000..6d2d9df16 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/modules/5.png differ diff --git a/survey_question_duplicator/static/description/assets/modules/6.png b/survey_question_duplicator/static/description/assets/modules/6.png new file mode 100644 index 000000000..0c9bb377e Binary files /dev/null and b/survey_question_duplicator/static/description/assets/modules/6.png differ diff --git a/survey_question_duplicator/static/description/assets/screenshots/Screenshot.jpg b/survey_question_duplicator/static/description/assets/screenshots/Screenshot.jpg new file mode 100644 index 000000000..76745ec58 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/screenshots/Screenshot.jpg differ diff --git a/survey_question_duplicator/static/description/assets/screenshots/Screenshot1.png b/survey_question_duplicator/static/description/assets/screenshots/Screenshot1.png new file mode 100644 index 000000000..51f300a96 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/screenshots/Screenshot1.png differ diff --git a/survey_question_duplicator/static/description/assets/screenshots/Screenshot3.png b/survey_question_duplicator/static/description/assets/screenshots/Screenshot3.png new file mode 100644 index 000000000..a3800230e Binary files /dev/null and b/survey_question_duplicator/static/description/assets/screenshots/Screenshot3.png differ diff --git a/survey_question_duplicator/static/description/assets/screenshots/Screenshot4.png b/survey_question_duplicator/static/description/assets/screenshots/Screenshot4.png new file mode 100644 index 000000000..dd686a444 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/screenshots/Screenshot4.png differ diff --git a/survey_question_duplicator/static/description/assets/screenshots/Screenshot5.png b/survey_question_duplicator/static/description/assets/screenshots/Screenshot5.png new file mode 100644 index 000000000..40c8d8fdc Binary files /dev/null and b/survey_question_duplicator/static/description/assets/screenshots/Screenshot5.png differ diff --git a/survey_question_duplicator/static/description/assets/screenshots/Screenshot6.png b/survey_question_duplicator/static/description/assets/screenshots/Screenshot6.png new file mode 100644 index 000000000..32343a171 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/screenshots/Screenshot6.png differ diff --git a/survey_question_duplicator/static/description/assets/screenshots/Screenshot7.png b/survey_question_duplicator/static/description/assets/screenshots/Screenshot7.png new file mode 100644 index 000000000..8c73ad5ab Binary files /dev/null and b/survey_question_duplicator/static/description/assets/screenshots/Screenshot7.png differ diff --git a/survey_question_duplicator/static/description/assets/screenshots/hero.gif b/survey_question_duplicator/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..aaa8adea2 Binary files /dev/null and b/survey_question_duplicator/static/description/assets/screenshots/hero.gif differ diff --git a/survey_question_duplicator/static/description/banner.jpg b/survey_question_duplicator/static/description/banner.jpg new file mode 100644 index 000000000..567b7e313 Binary files /dev/null and b/survey_question_duplicator/static/description/banner.jpg differ diff --git a/survey_question_duplicator/static/description/icon.png b/survey_question_duplicator/static/description/icon.png new file mode 100644 index 000000000..eb336209a Binary files /dev/null and b/survey_question_duplicator/static/description/icon.png differ diff --git a/survey_question_duplicator/static/description/index.html b/survey_question_duplicator/static/description/index.html new file mode 100644 index 000000000..ae40c348f --- /dev/null +++ b/survey_question_duplicator/static/description/index.html @@ -0,0 +1,628 @@ +
+ +
+ +
+
+ Enterprise +
+
+ Community +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Question Duplicator in Survey +

+

+ This Module Provides a Feature that Makes it Possible to + Duplicate Survey Questions to Multiple Surveys.

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

+ Explore This + Module

+
+ + + +
+
+ +
+

+ Overview +

+
+
+
+ In the Survey module, there is no possibility to duplicate the + questions. With the help of this module, users can + quickly and easily add the same question to several surveys. Both the + list view and the form view of the question support duplication. The + list view allows for the selection of several questions for duplication, + and the duplicated questions can then be added to numerous surveys + simultaneously. +
+
+ + +
+
+ +
+

+ Features +

+
+
+
+
+ + Allows you to quickly duplicate many Survey + Questions at once. +
+
+ + A Survey Question can be duplicated to Several + Surveys at once. +
+
+
+ + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Navigate to Questions menu under Survey -> Questions -> + Questions and open any Question. +

+ +
+
+

+ Click on Action -> Add To Survey. +

+ +
+
+

+ Select surveys that must contain the Question. +

+ +
+
+

+ Duplicated Question in the Survey. +

+

+

+ +
+
+

+ From the List view, select multiple questions for duplication. +

+

+ Select the questions for duplication. Then click on Actions -> + Add To Survey. +

+ +
+
+

+ Select Surveys that must contain the Questions. +

+ +
+
+

+ Duplicated Questions in the Survey. +

+ +
+
+
+ + +
+
+ +
+

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

+
+
+
+
+ + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/survey_question_duplicator/views/survey_question_views.xml b/survey_question_duplicator/views/survey_question_views.xml new file mode 100644 index 000000000..b1e42af77 --- /dev/null +++ b/survey_question_duplicator/views/survey_question_views.xml @@ -0,0 +1,14 @@ + + + + + Add To Survey + + + list,form + code + action =records.action_add_question() + + + diff --git a/survey_question_duplicator/wizard/__init__.py b/survey_question_duplicator/wizard/__init__.py new file mode 100644 index 000000000..3d2a12e08 --- /dev/null +++ b/survey_question_duplicator/wizard/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from . import survey_selector diff --git a/survey_question_duplicator/wizard/survey_selector.py b/survey_question_duplicator/wizard/survey_selector.py new file mode 100644 index 000000000..a69775a63 --- /dev/null +++ b/survey_question_duplicator/wizard/survey_selector.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mruthul Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from odoo import fields, models + + +class SurveySelector(models.TransientModel): + """Wizard for selecting the surveys to which questions to be added""" + _name = "survey.selector" + _description = "Survey Selector" + + survey_ids = fields.Many2many('survey.survey', string="Surveys", + help="Select the surveys to which the" + " questions to be added", required=True) + + def action_add_to_survey(self): + """Method for adding the questions to the selected surveys if the + question not already included.""" + for question_id in self._context.get('active_ids'): + for survey in self.survey_ids: + question = self.env['survey.question'].browse(question_id) + if [survey, question.title, + question.question_type, + question.suggested_answer_ids.mapped('value')] not in [ + [survey, rec.title, rec.question_type, + rec.suggested_answer_ids.mapped('value')] for + rec in + survey.question_and_page_ids]: + survey_question = self.env['survey.question'].sudo( + ).create({ + 'survey_id': survey.id, + 'title': question.title, + 'question_type': question.question_type, + 'description': question.description, + 'comments_allowed': question.comments_allowed, + 'is_conditional': question.is_conditional, + 'constr_mandatory': question.constr_mandatory, + 'is_time_limited': question.is_time_limited, + }) + self.env['survey.question.answer'].sudo().create( + question.suggested_answer_ids.filtered( + lambda r: r.value).mapped(lambda r: { + 'question_id': survey_question.id, + 'value': r.value, + 'is_correct': r.is_correct, + 'answer_score': r.answer_score, + 'value_image': r.value_image, + })) diff --git a/survey_question_duplicator/wizard/survey_selector_views.xml b/survey_question_duplicator/wizard/survey_selector_views.xml new file mode 100644 index 000000000..409e18433 --- /dev/null +++ b/survey_question_duplicator/wizard/survey_selector_views.xml @@ -0,0 +1,23 @@ + + + + + survey.selector.view.form + survey.selector + +
+ + + + +
+
+
+