summaryrefslogtreecommitdiff
path: root/addons/website_slides_survey
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-12-03 17:08:25 +0000
committerThibault Delavallée <tde@odoo.com>2019-12-05 15:21:28 +0000
commit2a35d92b6c0bdbb0f42e8dde066330a254a99887 (patch)
tree64884e1955e464577065a874dac282910cd37855 /addons/website_slides_survey
parent3a094f22941217932004ca53b94ae305712a4ac0 (diff)
[REF] survey: on survey.user_input, rename question_ids field to predefined_question_ids
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 ``question_ids`` field name is quite difficult to understand as we wonder why there is such a field on user input model. As its purpose is to store questions user has to answer (randomly chosen or all chosen) let us rename it to ``predefined_question_ids``. Moreover starting from now on if it is now given at create it is automatically computed. Classic flows go through ``survey._create_answer()`` method that prepares them accordingly. However tests or demo data do not necessarily go through that method and it makes scoring fail (notably) if people forget to define them. Let us automatically generate them at user input create if not given. 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')
-rw-r--r--addons/website_slides_survey/data/survey_demo.xml5
1 files changed, 0 insertions, 5 deletions
diff --git a/addons/website_slides_survey/data/survey_demo.xml b/addons/website_slides_survey/data/survey_demo.xml
index 2cb6451cbcf..ec55e786474 100644
--- a/addons/website_slides_survey/data/survey_demo.xml
+++ b/addons/website_slides_survey/data/survey_demo.xml
@@ -109,11 +109,6 @@
<field name="partner_id" ref="base.res_partner_address_3"/>
<field name="email">douglas.fletcher51@example.com</field>
<field name="state">done</field>
- <field name="question_ids" eval="[
- ref('furniture_certification_page_1_question_1'),
- ref('furniture_certification_page_1_question_2'),
- ref('furniture_certification_page_1_question_3'),
- ]"/>
</record>
<record model="survey.user_input" id="furniture_certification_answer_2">
<field name="survey_id" ref="website_slides_survey.furniture_certification" />