summaryrefslogtreecommitdiff
path: root/addons/hr_recruitment_survey
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-11-25 12:26:57 +0000
committerThibault Delavallée <tde@odoo.com>2019-12-05 15:21:28 +0000
commit2592e72f2cd80f09fb23b4b16f8eb92ba253ff67 (patch)
treeed6af2529339fc37003f28384aab8499bde85aa0 /addons/hr_recruitment_survey
parent84bb9c748db26656d3ecd062183afe5f042dc569 (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/hr_recruitment_survey')
-rw-r--r--addons/hr_recruitment_survey/data/survey_demo.xml38
1 files changed, 19 insertions, 19 deletions
diff --git a/addons/hr_recruitment_survey/data/survey_demo.xml b/addons/hr_recruitment_survey/data/survey_demo.xml
index 86b25eec9d2..11f02802989 100644
--- a/addons/hr_recruitment_survey/data/survey_demo.xml
+++ b/addons/hr_recruitment_survey/data/survey_demo.xml
@@ -83,58 +83,58 @@
<field name="question_type">matrix</field>
<field name="matrix_subtype">simple</field>
</record>
- <record id="survey_recruitment_form_p1_q8_col1" model="survey.label">
+ <record id="survey_recruitment_form_p1_q8_col1" model="survey.question.answer">
<field name="question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">1</field>
<field name="value">Not important</field>
</record>
- <record id="survey_recruitment_form_p1_q8_col2" model="survey.label">
+ <record id="survey_recruitment_form_p1_q8_col2" model="survey.question.answer">
<field name="question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">3</field>
<field name="value">Important</field>
</record>
- <record id="survey_recruitment_form_p1_q8_col3" model="survey.label">
+ <record id="survey_recruitment_form_p1_q8_col3" model="survey.question.answer">
<field name="question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">4</field>
<field name="value">Very important</field>
</record>
- <record id="survey_recruitment_form_p1_q8_row1" model="survey.label">
- <field name="question_id_2" ref="survey_recruitment_form_p1_q8"/>
+ <record id="survey_recruitment_form_p1_q8_row1" model="survey.question.answer">
+ <field name="matrix_question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">1</field>
<field name="value">Having a good pay</field>
</record>
- <record id="survey_recruitment_form_p1_q8_row2" model="survey.label">
- <field name="question_id_2" ref="survey_recruitment_form_p1_q8"/>
+ <record id="survey_recruitment_form_p1_q8_row2" model="survey.question.answer">
+ <field name="matrix_question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">2</field>
<field name="value">Getting on with colleagues</field>
</record>
- <record id="survey_recruitment_form_p1_q8_row3" model="survey.label">
- <field name="question_id_2" ref="survey_recruitment_form_p1_q8"/>
+ <record id="survey_recruitment_form_p1_q8_row3" model="survey.question.answer">
+ <field name="matrix_question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">3</field>
<field name="value">Having a nice office environment</field>
</record>
- <record id="survey_recruitment_form_p1_q8_row4" model="survey.label">
- <field name="question_id_2" ref="survey_recruitment_form_p1_q8"/>
+ <record id="survey_recruitment_form_p1_q8_row4" model="survey.question.answer">
+ <field name="matrix_question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">5</field>
<field name="value">Working with state of the art technology</field>
</record>
- <record id="survey_recruitment_form_p1_q8_row5" model="survey.label">
- <field name="question_id_2" ref="survey_recruitment_form_p1_q8"/>
+ <record id="survey_recruitment_form_p1_q8_row5" model="survey.question.answer">
+ <field name="matrix_question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">6</field>
<field name="value">Office location</field>
</record>
- <record id="survey_recruitment_form_p1_q8_row6" model="survey.label">
- <field name="question_id_2" ref="survey_recruitment_form_p1_q8"/>
+ <record id="survey_recruitment_form_p1_q8_row6" model="survey.question.answer">
+ <field name="matrix_question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">7</field>
<field name="value">Management quality</field>
</record>
- <record id="survey_recruitment_form_p1_q8_row7" model="survey.label">
- <field name="question_id_2" ref="survey_recruitment_form_p1_q8"/>
+ <record id="survey_recruitment_form_p1_q8_row7" model="survey.question.answer">
+ <field name="matrix_question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">8</field>
<field name="value">Having freebies such as tea, coffee and stationery</field>
</record>
- <record id="survey_recruitment_form_p1_q8_row8" model="survey.label">
- <field name="question_id_2" ref="survey_recruitment_form_p1_q8"/>
+ <record id="survey_recruitment_form_p1_q8_row8" model="survey.question.answer">
+ <field name="matrix_question_id" ref="survey_recruitment_form_p1_q8"/>
<field name="sequence">9</field>
<field name="value">Getting perks such as free parking, gym passes</field>
</record>