[FIX] survey: fix form view issues

Before this commit:
1) The `certification` field was visible when `scoring_type` was set to
'No scoring'.
2) The `description` field of the Badge in form view was not taking the full
width of the sheet.

After this commit:
1) The `certification` field will be invisible if `scoring_type` is set to
'No scoring'.
2) The `description` field of the Badge in form view will take the full width of
the sheet.

Task-3367524

closes odoo/odoo#141120

X-original-commit: 094b2c53e8065de383d35bd0725e247345289867
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Pratik Raval (PRRA)
2023-11-13 10:31:45 +00:00
parent 1bbcd098f1
commit 30047d89b9
2 changed files with 3 additions and 5 deletions
@@ -15,9 +15,7 @@
<field name="name" placeholder="e.g. Problem Solver"/>
</h1>
</div>
<group>
<field name="description" nolabel="1" placeholder="e.g. No one can solve challenges like you do"/>
</group>
<field name="description" placeholder="e.g. No one can solve challenges like you do"/>
<group string="Rewards for challenges">
<field name="level"/>
</group>
+2 -2
View File
@@ -129,10 +129,10 @@
<field name="scoring_type" widget="radio" force_save="1"/>
<field name="scoring_success_min" invisible="scoring_type == 'no_scoring'" />
<label for="certification"
invisible="survey_type == 'live_session'"/>
invisible="survey_type == 'live_session' or scoring_type == 'no_scoring'"/>
<div class="o_checkbox_optional_field"
invisible="survey_type == 'live_session'">
<field name="certification" nolabel="1"/>
<field name="certification" invisible="scoring_type == 'no_scoring'"/>
<div invisible="not certification" class="w-100">
<field name="certification_report_layout" placeholder="Pick a Style..." class="w-50"/>
<button name="action_survey_preview_certification_template"