diff options
| author | Thibault Delavallée <tde@odoo.com> | 2019-11-27 08:51:44 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-12-05 15:21:28 +0000 |
| commit | 3a094f22941217932004ca53b94ae305712a4ac0 (patch) | |
| tree | f0d8577078fee8530e21b3f4d3f0f70e6db0773c /addons/website_slides_survey/tests | |
| parent | 755ac5f313fd16031728055530db8ed7260acef8 (diff) | |
[REF] survey: on survey.user_input.line, rename value_suggested{_row} fields
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
A new naming for ``survey.question.answer`` has been recently introduced:
``suggested_answer_ids`` and ``matrix_row_ids``. In this commit we propagate
that naming to survey.user_input.line model. New naming is
* ``suggested_answer_id``: one chosen value for single / multiple choice.
It is also used for matrix columns as those indicates the value to give
on a given row;
* ``matrix_row_id``: the related row of the suggested answer for matrix
questions;
It adds two benefits
* it finishes by _id which is always a good idea for m2o fields;
* it better indicates the use;
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/tests')
| -rw-r--r-- | addons/website_slides_survey/tests/test_course_certification_failure.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_slides_survey/tests/test_course_certification_failure.py b/addons/website_slides_survey/tests/test_course_certification_failure.py index 1487fb2eea0..f8c6a4011cd 100644 --- a/addons/website_slides_survey/tests/test_course_certification_failure.py +++ b/addons/website_slides_survey/tests/test_course_certification_failure.py @@ -116,7 +116,7 @@ class TestCourseCertificationFailureFlow(TestSurveyCommon): 'question_id': question.id, 'answer_type': 'suggestion', 'answer_score': 1 if good_answers else 0, - 'value_suggested': question.suggested_answer_ids[1 if good_answers else 0].id + 'suggested_answer_id': question.suggested_answer_ids[1 if good_answers else 0].id }) for question in questions ] }) |
