question |
Survey Question
Catalog: Odoo
Schema: survey
Documentation:
Questions that will be asked in a survey.
Each question can have one of more suggested answers (eg. in case of
multi-answer checkboxes, radio buttons...).
Technical note:
survey.question is also the model used for the survey's pages (with the "is_page" field set to True).
A page corresponds to a "section" in the interface, and the fact that it separates the survey in
actual pages in the interface depends on the "questions_layout" parameter on the survey.survey model.
Pages are also used when randomizing questions. The randomization can happen within a "page".
Using the same model for questions and pages allows to put all the pages and questions together in a o2m field
(see survey.survey.question_and_page_ids) on the view side and easily reorganize your survey by dragging the
items around.
It also removes on level of encoding by directly having 'Add a page' and 'Add a question'
links on the tree view of questions, enabling a faster encoding.
However, this has the downside of making the code reading a little bit more complicated.
Efforts were made at the model level to create computed fields so that the use of these models
still seems somewhat logical. That means:
- A survey still has "page_ids" (question_and_page_ids filtered on is_page = True)
- These "page_ids" still have question_ids (questions located between this page and the next)
- These "question_ids" still have a "page_id"
That makes the use and display of these information at view and controller levels easier to understand.
The data in this table is partitioned per value of the column.
This is a read-only table. The Odoo API may not support changing the data or the Invantive SQL driver for Odoo does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Odoo API.
Table Columns
The columns of the table question are shown below. Each column has an SQL data type.
Name |
Data Type |
Label |
Required |
Documentation |
---|---|---|---|---|
allowed_triggering_question_ids |
string |
|
☐ |
|
answer_date |
datetime |
Correct date answer |
☐ |
Correct date answer for this question. |
answer_datetime |
datetime |
Correct datetime answer |
☐ |
Correct date and time answer for this question. |
answer_numerical_box |
decimal |
Correct numerical answer |
☐ |
Correct number answer for this question. |
answer_score |
decimal |
Score |
☐ |
Score value for a correct answer to this question. |
background_image_url |
string |
Background Url |
☐ |
|
background_image |
byte[] |
Background Image |
☐ |
|
comment_count_as_answer |
boolean |
Comment is an answer |
☐ |
|
comments_allowed |
boolean |
Show Comments Field |
☐ |
|
comments_message |
string |
Comment Message |
☐ |
|
constr_error_msg |
string |
Error message |
☐ |
|
constr_mandatory |
boolean |
Mandatory Answer |
☐ |
|
create_date |
datetime |
Created on |
☐ |
|
create_uid_label |
string |
|
☐ |
|
create_uid |
string |
|
☐ |
|
description |
string |
Description |
☐ |
Use this field to add additional explanations about your question or to illustrate it with pictures or a video |
display_name |
string |
Display Name |
☐ |
|
id |
int32 |
ID |
☐ |
|
is_conditional |
boolean |
Conditional Display |
☐ |
If checked, this question will be displayed onlyif the specified conditional answer have been selected in a previous question |
is_page |
boolean |
Is a page? |
☐ |
|
is_placed_before_trigger |
boolean |
Is misplaced? |
☐ |
Is this question placed before its trigger question? |
is_scored_question |
boolean |
Scored |
☐ |
Include this question as part of quiz scoring. Requires an answer and answer score to be taken into account. |
is_time_limited |
boolean |
The question is limited in time |
☐ |
Currently only supported for live sessions. |
matrix_row_ids |
string |
|
☐ |
Labels used for proposed choices: rows of matrix |
matrix_subtype |
string |
Matrix Type |
☐ |
|
page_id_label |
string |
|
☐ |
|
page_id |
string |
|
☐ |
|
question_ids |
string |
|
☐ |
|
question_placeholder |
string |
Placeholder |
☐ |
|
question_type |
string |
Question Type |
☐ |
|
questions_selection |
string |
Question Selection |
☐ |
If randomized is selected, add the number of random questions next to the section. |
random_questions_count |
int32 |
# Questions Randomly Picked |
☐ |
Used on randomized sections to take X random questions from all the questions of that section. |
save_as_email |
boolean |
Save as user email |
☐ |
If checked, this option will save the user's answer as its email address. |
save_as_nickname |
boolean |
Save as user nickname |
☐ |
If checked, this option will save the user's answer as its nickname. |
scoring_type |
string |
Scoring Type |
☐ |
|
sequence |
int32 |
Sequence |
☐ |
|
suggested_answer_ids |
string |
|
☐ |
Labels used for proposed choices: simple choice, multiple choice and columns of matrix |
survey_id_label |
string |
|
☐ |
|
survey_id |
string |
|
☐ |
|
time_limit |
int32 |
Time limit (seconds) |
☐ |
|
title |
string |
Title |
☑ |
|
triggering_answer_id_label |
string |
|
☐ |
Answer that will trigger the display of the current question. |
triggering_answer_id |
string |
|
☐ |
Answer that will trigger the display of the current question. |
triggering_question_id_label |
string |
|
☐ |
Question containing the triggering answer to display the current question. |
triggering_question_id |
string |
|
☐ |
Question containing the triggering answer to display the current question. |
user_input_line_ids |
string |
|
☐ |
|
validation_email |
boolean |
Input must be an email |
☐ |
|
validation_error_msg |
string |
Validation Error |
☐ |
|
validation_length_max |
int32 |
Maximum Text Length |
☐ |
|
validation_length_min |
int32 |
Minimum Text Length |
☐ |
|
validation_max_date |
datetime |
Maximum Date |
☐ |
|
validation_max_datetime |
datetime |
Maximum Datetime |
☐ |
|
validation_max_float_value |
decimal |
Maximum value |
☐ |
|
validation_min_date |
datetime |
Minimum Date |
☐ |
|
validation_min_datetime |
datetime |
Minimum Datetime |
☐ |
|
validation_min_float_value |
decimal |
Minimum value |
☐ |
|
validation_required |
boolean |
Validate entry |
☐ |
|
write_date |
datetime |
Last Updated on |
☐ |
|
write_uid_label |
string |
|
☐ |
|
write_uid |
string |
|
☐ |
|
01-03-2023 15:29 Version 22.1.135-BETA+3826