diff options
| author | Thibault Delavallée <tde@odoo.com> | 2019-11-25 12:26:57 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-12-05 15:21:28 +0000 |
| commit | 2592e72f2cd80f09fb23b4b16f8eb92ba253ff67 (patch) | |
| tree | ed6af2529339fc37003f28384aab8499bde85aa0 /addons/website_slides_survey/data | |
| parent | 84bb9c748db26656d3ecd062183afe5f042dc569 (diff) | |
[REF] survey: globally rename survey.label model to survey.question.answer
PURPOSE
As new features are about to land in survey, notably live interactions [1]
and new survey building [2] performing a pre cleaning is necessary. In this
PR we clean survey models by: removing unnecessary fields, cleaning some code
and finally renaming models.
SPECIFICATIONS
In this commit we rename the long standing ``survey.label`` model. Indeed
a label is something before a question, like an input label. Labels in survey
are used for suggested answers and sometimes as rows for matrix answers.
After much thoughts we rename ``survey.label`` to ``survey.question.answer``.
It indicates this model holds answers. Moreover it is namespaced within the
``survey.question`` model name to avoid conflict with user input / user answer
model.
As model naming changes, some fields also evolve. In survey.question model
* ``labels_id`` is renamed to ``suggested_answer_ids`` to indicate it is
used to display suggested values to the user;
* ``labels_id_2`` is renamed to ``matrix_row_ids`` to indicate it is used
to generate the rows of the matrix-type question. A matrix is therefore
done using ``matrix_row_ids`` for rows and ``suggested_answer_ids`` for
columns which seems easier to understand;
In survey.question.answer (old survey.label) model
* ``question_id_2`` is renamed to ``matrix_question_id`` to ease its
understanding, notably that it is used for matrix questions;
LINKS
[0] Related to Task ID 2061901 (survey models cleaning and preparation)
[1] Task ID 1972640 (live interactions)
[2] Task ID 2119587 (new frontend for building surveys)
PR #40765
Diffstat (limited to 'addons/website_slides_survey/data')
| -rw-r--r-- | addons/website_slides_survey/data/survey_demo.xml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/addons/website_slides_survey/data/survey_demo.xml b/addons/website_slides_survey/data/survey_demo.xml index 1d3b05224b4..c1dc1400b5e 100644 --- a/addons/website_slides_survey/data/survey_demo.xml +++ b/addons/website_slides_survey/data/survey_demo.xml @@ -34,24 +34,24 @@ <field name="display_mode">dropdown</field> <field name="constr_mandatory" eval="True" /> </record> - <record model="survey.label" id="furniture_certification_page_1_question_1_choice_1"> + <record model="survey.question.answer" id="furniture_certification_page_1_question_1_choice_1"> <field name="question_id" ref="furniture_certification_page_1_question_1"/> <field name="sequence">1</field> <field name="value">Fir</field> </record> - <record model="survey.label" id="furniture_certification_page_1_question_1_choice_2"> + <record model="survey.question.answer" id="furniture_certification_page_1_question_1_choice_2"> <field name="question_id" ref="furniture_certification_page_1_question_1"/> <field name="sequence">2</field> <field name="value">Oak</field> <field name="is_correct" eval="True" /> <field name="answer_score">2.0</field> </record> - <record model="survey.label" id="furniture_certification_page_1_question_1_choice_3"> + <record model="survey.question.answer" id="furniture_certification_page_1_question_1_choice_3"> <field name="question_id" ref="furniture_certification_page_1_question_1"/> <field name="sequence">3</field> <field name="value">Ash</field> </record> - <record model="survey.label" id="furniture_certification_page_1_question_1_choice_4"> + <record model="survey.question.answer" id="furniture_certification_page_1_question_1_choice_4"> <field name="question_id" ref="furniture_certification_page_1_question_1"/> <field name="sequence">4</field> <field name="value">Beech</field> @@ -64,34 +64,34 @@ <field name="question_type">multiple_choice</field> <field name="column_nb">4</field> </record> - <record model="survey.label" id="furniture_certification_page_1_question_2_choice_1"> + <record model="survey.question.answer" id="furniture_certification_page_1_question_2_choice_1"> <field name="question_id" ref="furniture_certification_page_1_question_2"/> <field name="sequence">1</field> <field name="value">Chair</field> <field name="is_correct" eval="True" /> <field name="answer_score">1.0</field> </record> - <record model="survey.label" id="furniture_certification_page_1_question_2_choice_2"> + <record model="survey.question.answer" id="furniture_certification_page_1_question_2_choice_2"> <field name="question_id" ref="furniture_certification_page_1_question_2"/> <field name="sequence">2</field> <field name="value">Table</field> <field name="answer_score">-1.0</field> </record> - <record model="survey.label" id="furniture_certification_page_1_question_2_choice_3"> + <record model="survey.question.answer" id="furniture_certification_page_1_question_2_choice_3"> <field name="question_id" ref="furniture_certification_page_1_question_2"/> <field name="sequence">3</field> <field name="value">Desk</field> <field name="is_correct" eval="True" /> <field name="answer_score">1.0</field> </record> - <record model="survey.label" id="furniture_certification_page_1_question_2_choice_4"> + <record model="survey.question.answer" id="furniture_certification_page_1_question_2_choice_4"> <field name="question_id" ref="furniture_certification_page_1_question_2"/> <field name="sequence">4</field> <field name="value">Shelve</field> <field name="is_correct" eval="True" /> <field name="answer_score">1.0</field> </record> - <record model="survey.label" id="furniture_certification_page_1_question_2_choice_5"> + <record model="survey.question.answer" id="furniture_certification_page_1_question_2_choice_5"> <field name="question_id" ref="furniture_certification_page_1_question_2"/> <field name="sequence">5</field> <field name="value">Bed</field> |
