summaryrefslogtreecommitdiff
path: root/addons/hr_recruitment_survey
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-11-29 14:26:41 +0000
committerThibault Delavallée <tde@odoo.com>2019-12-05 15:21:28 +0000
commit755ac5f313fd16031728055530db8ed7260acef8 (patch)
tree8d7883a8a32a6c7c8f3b9caa0a8684d520da8280 /addons/hr_recruitment_survey
parent1e66894042a3920179f14f19b50b692845f3a004 (diff)
[REF] survey: on survey.user_input, rename some fields to ease understanding
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: RENAME QUIZ_SCORE ON SURVEY.USER_INPUT On survey.user_input, quiz_score field to scoring_percentage ``quiz_score`` field name is related to the old "quiz" behavior of surveys that is replaced by certifications and scoring mechanisms. Let us propagate the renaming, beginning with a ``scoring_`` prefix. SPECIFICATIONS: RENAME QUIZZ_PASSED ON SURVEY.USER_INPUT on survey.user_input, rename quizz_passed field to scoring_success ``quizz_passed`` field name is related to the old "quiz" behavior of surveys that is replaced by certifications and scoring mechanisms. Let us propagate the renaming, beginning with a ``scoring_`` prefix. SPECIFICATIONS: RENAME TOKEN ON SURVEY.USER_INPUT on survey.user_input, rename token field to access_token Survey user input model holds two token field. One is used to distinguish a pool of attempts linked to a given invite: ``invite_token``. The other one is used to control access to a specific user input. It means that ``invite_token`` indicates a set of user inputs and each of them is accessed through its own ``token``. To be coherent with other naming in odoo this latter field is renamed to ``access_token``. 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/tests/test_recruitment_survey.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/hr_recruitment_survey/tests/test_recruitment_survey.py b/addons/hr_recruitment_survey/tests/test_recruitment_survey.py
index f7a6ac20df3..f47ad40a1be 100644
--- a/addons/hr_recruitment_survey/tests/test_recruitment_survey.py
+++ b/addons/hr_recruitment_survey/tests/test_recruitment_survey.py
@@ -31,7 +31,7 @@ class TestRecruitmentSurvey(common.SingleTransactionCase):
action_start = self.job_sysadmin.action_start_survey()
self.assertEqual(action_start['type'], 'ir.actions.act_url')
self.assertNotEqual(self.job_sysadmin.response_id.id, False)
- self.assertIn(self.job_sysadmin.response_id.token, action_start['url'])
+ self.assertIn(self.job_sysadmin.response_id.access_token, action_start['url'])
action_start_with_response = self.job_sysadmin.action_start_survey()
self.assertEqual(action_start_with_response, action_start)
@@ -42,4 +42,4 @@ class TestRecruitmentSurvey(common.SingleTransactionCase):
self.assertEqual(action_print['type'], 'ir.actions.act_url')
self.job_sysadmin.response_id = self.env['survey.user_input'].create({'survey_id': self.survey_sysadmin.id})
action_print_with_response = self.job_sysadmin.action_print_survey()
- self.assertIn(self.job_sysadmin.response_id.token, action_print_with_response['url'])
+ self.assertIn(self.job_sysadmin.response_id.access_token, action_print_with_response['url'])