Last active
October 16, 2023 23:34
-
-
Save gdgellatly/a998366b87b3226c671139fc9de6a851 to your computer and use it in GitHub Desktop.
Dynamic Field Labels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<group name="custom_questions" > | |
<label | |
for="" | |
attrs="{'invisible': [('internal_question_count', '<', 1)]}" | |
> | |
<field name="internal_question_1_label" nolabel="1" attrs="{'invisible': [('internal_question_count', '<', 1)]}" class="o_form_label" readonly="1"/> | |
</label> | |
<field | |
name="internal_question_1_answer" | |
attrs="{'invisible': [('internal_question_count', '<', 1)]}" | |
nolabel="1" | |
/> | |
</group> | |
<!-- | |
label fields are just computed from the name of each m2m of questions, | |
count is just the length of those m2ms | |
yes all those attrs are needed | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment