[MIG] survey_extra_fields, survey_base : modifications to make them work in v18

This commit is contained in:
2026-06-10 16:56:56 +02:00
parent 8f235646ef
commit 8a2075a3db
10 changed files with 194 additions and 182 deletions

View File

@@ -8,10 +8,10 @@
<field name="arch" type="xml">
<xpath expr="//page[@name='options']//field[@name='matrix_subtype']" position="before">
<field name="max_file_size"
attrs="{'invisible': [('question_type', '!=', 'file')]}"
invisible="question_type != 'file'"
string="Max File Size (MB)"/>
<field name="allowed_extensions"
attrs="{'invisible': [('question_type', '!=', 'file')]}"
invisible="question_type != 'file'"
placeholder=".pdf,.docx,.xlsx"/>
</xpath>
</field>

View File

@@ -6,7 +6,7 @@
id="question_container_inh_type_file"
inherit_id="survey.question_container"
>
<xpath expr="//t[@t-call='survey.question_matrix']/.." position="after">
<xpath expr="//t[@t-call='survey.question_matrix']" position="after">
<t t-if="question.question_type == 'file'">
<t t-call="survey_extra_fields.question_file"/>
</t>

View File

@@ -8,7 +8,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='suggested_answer_id']" position="after">
<field name="value_file" filename="value_file_fname" colspan="2"
attrs="{'invisible': [('answer_type', '!=', 'file')]}"/>
invisible="answer_type != 'file'"/>
<field name="value_file_fname" invisible="1"/>
</xpath>
</field>