Files
odoo_source/addons/survey/models
Nasreddin Boulif (bon) 2cdebb3783 [FIX] survey: copy the triggering question to the right question
Steps to reproduce:

  - Install 'survey' module
  - Create a survey with 2 questions
  - Change the sequence of the questions
  - Edit the second question (last in the sequence)
  - Set it as conditional
  - Select first question as trigger (with any answer)
  - Duplicate the survey

Issue:

  The triggering question is not set on the right question.

Cause:

  When copying the survey, we map the old question to the new ones but
  there are by default sorted by order of creation and not by sequence
  and therefore the mapping is wrong.

Solution:

  Order the questions and answers by sequence before mapping them.

opw-3330476

closes odoo/odoo#127681

X-original-commit: 70f7e13c38acd07ea04324bc78e379dac6051e41
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-07-06 23:44:32 +02:00
..
…