[IMP] survey: hide Answer page if no scoring

Purpose
=======
Avoid showing the "Correct Answer" field if the survey is not scored
(for question type numerical, date or datetime). Since it is the only
field on this page, hide the page completely.

Task-2795296

closes odoo/odoo#87074

X-original-commit: 71af5dfc69dfb22b3700986c16fa116447d06796
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Fabio Barbero
2022-03-23 19:25:19 +01:00
parent d3e4fce07c
commit d3ac342041
@@ -109,7 +109,10 @@
</group>
</group>
<notebook>
<page string="Answers" name="answers" attrs="{'invisible': ['|', ('is_page', '=', True), ('question_type', '=', 'text_box')]}">
<page string="Answers" name="answers" attrs="{'invisible': ['|', '|',
('is_page', '=', True), ('question_type', '=', 'text_box'),
'&amp;', ('scoring_type', '=', 'no_scoring'), ('question_type', 'in', ['numerical_box', 'date', 'datetime']),
]}">
<group>
<group attrs="{'invisible': [('question_type', 'not in', ['char_box', 'numerical_box', 'date', 'datetime'])]}">
<field name="answer_numerical_box" string="Correct Answer"