Files
odoo_source/addons/survey
abd-msyukyu-odooandSalvo Rapisarda d1688b6ee3 [FIX] survey: prevent soft lock with conditional questions
If multiple questions are conditionally displayed if the user selects an answer
in another multi-choice question, that answer was added multiple times in the
list used to filter mandatory questions that have to be answered when displayed.
This is an issue because the answer was only removed once if the user changes
his choice resulting in a state where a mandatory question that is hidden stays
mandatory even though it is not displayed to the user.

How to reproduce:
- create a new survey with:
      - Question1:
        - multi-choice with one answer
        - 2 answers (A, B)
      - Question2:
        - single line text box
        - mandatory answer
        - conditional display depending on answer B of Question1
      - Question3:
        - single line text box
        - conditional display depending on answer B of Question1
- start the survey
- click on answer B then click on answer A

Current behavior:
- user is not able to submit the survey with answer A selected

Expected behavior:
- user should be able to submit the survey

Note:
The issue was already fixed from 17.0 in this [commit], but the test is
still adjusted to ensure that displaying/hiding multiple questions at once
depending on conditional triggers works as intended without preventing the user
to finalize the survey.

[commit]: https://github.com/odoo/odoo/commit/55fa52be8a80e6f7ee2a526db29c0d97c24ae8f6

task-3630079

closes odoo/odoo#147008

X-original-commit: f574ec49b730917e8e781a9b47895048a389d585
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
Co-authored-by: Salvo Rapisarda <sdrapisarda@gmail.com>
Co-authored-by: Damien Abeloos <abd@odoo.com>
2023-12-21 16:07:50 +00:00
..