Code Monkey home page Code Monkey logo

survey's Introduction

Runboat Pre-commit Status Build Status codecov Translation Status

OCA Survey Management Addons for Odoo

This project aims to deal with modules related to survey management.

Available addons

addon version maintainers summary
survey_conditional_question 14.0.1.0.0 Survey Conditional Questions
survey_description 14.0.1.0.0 remi-filament Displays description and thank you fields for survey, page and question.
survey_multiple_choice_max_answer 14.0.1.0.0 This module adds the possibility to limit the number of answers for a multiple choice question.
survey_question_type_binary 14.0.1.0.0 This module add binary field as question type for survey page
survey_question_type_five_star 14.0.1.0.1 This module add five stars rating as question type for survey page
survey_question_type_nps 14.0.1.0.0 This module add nps rating as question type for survey page
survey_text_question_validation_length 14.0.1.0.0 Define a minimum and a maximum text length for text box questions.
survey_xlsx 14.0.1.0.0 XLSX Report to show the survey results

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

survey's People

Contributors

adhoc-transbot avatar etobella avatar jjscarafia avatar kluna1998 avatar marielejeune avatar mymage avatar nicomacr avatar oca-git-bot avatar oca-travis avatar olgamarcocb avatar pedrobaeza avatar primes2h avatar remi-filament avatar sbejaoui avatar sbidoul avatar stefanrijnhart avatar susport avatar weblate avatar zamberjo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

survey's Issues

Preferential / ranked voting

Is your feature request related to a problem?
It's not possible to define a ranked voting survey.

Describe the solution you'd like
Ranked voting system can be chosen for some questions.

Describe alternatives you've considered
Loomio

Mandatory Conditional Questions Block Navigation After User Reverts Principal Answer

Module

Surveys (Odoo v16.0)

Describe the bug

When a user selects an answer that reveals more-than-one conditional questions where at least one is mandatory, followed by changing principal answer to hide conditional questions, the user is blocked from navigating to the next section.

Only one of the conditional questions must be marked as mandatory to prevent section navigation.

##Severity
Medium to Major
While this bug doesn't completely break survey module, it does break the ability to use multiple conditional questions -- where at least one is mandatory -- in response to a single principal question. This can be a serious problem for strategic information gathering.

To Reproduce

Odoo v16.0:

  1. Create a new survey.
  2. Configure presentation option to "One page per section".
  3. On the questions tab, add two sections and title them Section 1 and Section 2 respectively.
  4. Under the second section add a simple textfield question. This is necessary so that navigating from the first section doesn't go immediately to the end of the survey.
  5. Under the first section, add three multiple choice questions. Name the first question "Principal" and the second and third questions "Conditional 1" and "Conditional 2".
  6. The survey question table should look like this:
    image
  7. On Principal, add two answer choices with these values: "Show additional questions" and "Skip"
  8. On Conditional 1 and Conditional 2, add a couple multiple choice answers for each of them. The answers can be anything you want.
  9. Save the form. (Saving here is necessary so that the conditional options can be configured in the next step).
  10. Configure both conditional questions to be Conditional to the Principal. Set the Triggering Answer to be "Show additional questions"
  11. Make Conditional 1 mandatory. The other two questions should not be mandatory.
  12. Save the form.

Test the Survey

  1. Click Start Survey button.
  2. You should see the Principal Question.
  3. Select "Show additional questions"
  4. You should see the conditional questions.
  5. Change the principal answer to "Skip"
  6. Click Continue button
  7. Nothing should happen! Navigation is blocked!
  8. Change the principal answer to "Show additional questions"
  9. You should see that the first question has the red notice indicating an answer is required.

Follow up changes and Second Test

  1. Close the Test and go back to the Survey admin UI.
  2. Open the options for Conditional 2. Uncheck "Conditional".
  3. Save survey and test it again.
  4. Repeat the same test procedure from above but you should see that navigation works fine.

##Analysis
If there is more-than-one conditional question, the validation logic requires mandatory conditional questions to be answered.

##Additional Concerns
I haven't looked at the javascript code, because I'm completely new to Odoo framework and my time is quite constrained right now. However, I want to voice that the nature of this bug would lead a seasoned developer to question the efficacy of the underlying code. Its a very weird bug that, at least to my mind, suggests the entire validation logic might be a bit shakey -- I find it hard to imagine writing such a weird bug into my own javascript. This is a wildly speculative observation, but I think its worth mentioning. It would be bad if there are other strange bugs lurking with technical debt.

Migration to version 15.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

five star module has reference to scss parameter declared in nps module

Module

five star module

Describe the bug

five star module has reference to scss parameter declared in nps module

To Reproduce

Affected versions: 14.0

Steps to reproduce the behavior:

  1. install five star type module and do not install not nps type module
  2. visit a survey form
  3. see error page

Expected behavior
I shall not see an error message

Additional context

After installing the module, I am unable to go to contacts page. I get Odoo Server Error

Below is the error message I am prompted with. Please note that the module did not install properly. So I had to uninstall it. I am on Odoo CE version 12 hosted on AWS.

Odoo Server Error
Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/http.py", line 941, in call
return self.method(*args, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/api.py", line 745, in call_kw
return _call_kw_model(method, model, args, kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/api.py", line 718, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/models.py", line 1376, in load_views
for [v_id, v_type] in views
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/models.py", line 1376, in
for [v_id, v_type] in views
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/addons/mail/models/mail_thread.py", line 410, in fields_view_get
res = super(MailThread, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/models.py", line 1462, in fields_view_get
xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result['arch']), view_id)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/addons/base/models/ir_ui_view.py", line 1096, in postprocess_and_fields
self.raise_view_error(message, view_id)
File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20190618-py3.7.egg/odoo/addons/base/models/ir_ui_view.py", line 548, in raise_view_error
raise ValueError(message)
ValueError: Field survey_input_count does not exist

Error context:
View res.partner.form
[view_id: 113, xml_id: base.view_partner_form, model: res.partner, parent_id: n/a]

[12.0] Is there an addon to define the status of survey_user_input to expired?

Before proposing to upload a new addon called: survey_user_input_expired that we already have developed, I would like to know if something similar exists.

This addon would replace the state of the survey responses to define a new state called: expired
In addition, using a cron that runs once a day, responses with expired status are auto-defined with respect to all those that have a deadline defined.

Thank you very much.

Deleting a Question Deletes Collected Answers

Module

Surveys (on odoo 16.0)

Describe the bug

If you delete a question from a survey, then all participation (completed survey submission / user_input) answers to that question get deleted.

##Steps to Reproduce
Super easy to reproduce. Submit completion of any survey (collect at least one participation/user_input). Then go to the survey and delete a question. Then go view the Survey Participation Result, and you'll see the question and answer are gone.

Expected behavior
If I attempt to delete a question on a survey with linked participations, I should get a ForeignKey constraint violation error.

##How to fix
Navigate to surveys > models > survey_user_input.py > SurveyUserInputLine(models.Model) class > question_id
(Currently line 619)
The line for question_id property says:
question_id = fields.Many2one('survey.question', string='Question', ondelete='cascade', required=True)
This looks like a bug to me. "ondelete='cascade' means that a deletion to the question will delete all answers. This should be ondelete='restrict' so that the database refuses to delete a question that has user-submitted survey answers.

filter partners according to their answers in surveys

module: partner_survey
version: 8.0.1.0.0

Steps to reproduce

  • ...email survey to existing partner.
    partner clicks on link in email and answers survey.
    go to partner list view.
    under advanced search, the following options exist:
    • Survey number
    • Surveys
    • Surveys answers

Current behavior

  • Survey number appears to be populated with the number of surveys a partner has been sent? This has some use as a filter.
  • Surveys and Surveys answers appear to be expecting a date to be entered as the filter value or the following occurs:

Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\http.py", line 536, in _handle_exception
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\http.py", line 573, in dispatch
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\http.py", line 309, in _call_function
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\service\model.py", line 113, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\http.py", line 306, in checked_call
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\http.py", line 802, in call
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\http.py", line 402, in response_wrap
File "C:\Program Files (x86)\Odoo 8.0-20150522\server\openerp\addons\web\controllers\main.py", line 877, in search_read
File "C:\Program Files (x86)\Odoo 8.0-20150522\server\openerp\addons\web\controllers\main.py", line 898, in do_search_read
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\http.py", line 907, in proxy
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 241, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\models.py", line 5129, in search_read
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 241, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\models.py", line 1642, in search
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 241, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server\openerp\addons\base\res\res_partner.py", line 656, in _search
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 241, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\models.py", line 4638, in _search
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 241, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\models.py", line 4461, in _where_calc
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\osv\expression.py", line 646, in init
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\osv\expression.py", line 930, in parse
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 241, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 336, in old_api
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\models.py", line 1723, in name_search
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 239, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 462, in new_api
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\models.py", line 1735, in _name_search
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\api.py", line 241, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\models.py", line 4656, in _search
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\sql_db.py", line 158, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20150522\server.\openerp\sql_db.py", line 234, in execute
DataError: date/time field value out of range: "15"
LINE 1: ...input" WHERE ("survey_user_input"."date_create" = '15') ORDE...
^
HINT: Perhaps you need a different "datestyle" setting.

Expected behavior
I expected to be able to 'filter partners according to their answers in surveys'?

Roadmap

Roadmap

For example "percent" type : one respondent is asked how to spread his activity as a percentage from a preconfigured list pending precise values. Workaround : If no requirement for precise value, it can be configured ranges of values in a list of choices.

  • allow adding comment on each item for multiple choice answer
  • format "date time" type to set date and time or only date or only time
  • allow subquestions. Very useful with conditional_questions to loop on a page or series of questions
  • allow editing or inserting Odoo blocks in website survey inside of the question-answer group and not only around or after. For example, one respondent is asked to vote about pictures selection.
  • offer choice to the survey's administrator to display information from an existing object (for example : res.partner)
  • extend the existing notation to finely evaluate or profile by answering and generate actions (for example : generate sale order and sale order lines depending on respondent answers)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.