Skip to content

Commit de80a99

Browse files
committed
fix xml
1 parent 7d53459 commit de80a99

1 file changed

Lines changed: 13 additions & 18 deletions

File tree

product_creation_dynamic_wizard/views/product_creation_question.xml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
name="web_ribbon"
3636
title="Archived"
3737
bg_color="bg-danger"
38-
attrs="{'invisible': [('active', '=', True)]}"
38+
invisible="active == True"
3939
/>
4040
<div class="oe_title">
4141
<label for="name" class="oe_edit_only" />
@@ -55,31 +55,29 @@
5555
<field name="question_type" />
5656
<field
5757
name="is_automatic"
58-
attrs="{'readonly': [('question_type', '=', 'logical')]}"
58+
readonly="question_type == 'logical'"
5959
/>
6060
<field name="automatic_save" />
6161
<field
6262
name="conditional_question"
63-
attrs="{'invisible': ['|', ('parent_id', '=', False), ('parent_question_type', '=', 'logical')]}"
63+
invisible="not parent_id or parent_question_type == 'logical'"
6464
/>
6565
</group>
6666
<group>
6767
<field
6868
name="question"
69-
attrs="{'invisible': [('is_automatic', '=', True)], 'required': [('is_automatic', '!=', True)]}"
69+
invisible="is_automatic == True"
70+
required="not is_automatic"
7071
/>
7172
<field
7273
name="answer_required"
73-
attrs="{'invisible': [('question_type', 'in', ['logical'])]}"
74+
invisible="question_type in ['logical']"
7475
/>
7576
<field name="sequence" />
7677
</group>
7778
</group>
7879
<notebook>
79-
<page
80-
string="Apply if"
81-
attrs="{'invisible': [('conditional_question', '=', False)]}"
82-
>
80+
<page string="Apply if" invisible="not conditional_question">
8381
<div class="alert alert-info" role="alert">
8482
This question and its children will be applied only if response to the
8583
parent questions satisfy the following operator and value.
@@ -88,18 +86,18 @@
8886
<field name="conditional_operator" />
8987
<field
9088
name="conditional_expected_result"
91-
attrs="{'invisible': [('parent_question_type', '!=', 'field')]}"
89+
invisible="parent_question_type != 'field'"
9290
/>
9391
<field
9492
name="conditional_expected_result_answer_id"
9593
domain="[('question_id', '=', parent_id)]"
96-
attrs="{'invisible': [('parent_question_type', '!=', 'custom')]}"
94+
invisible="parent_question_type != 'custom'"
9795
/>
9896
</group>
9997
</page>
10098
<page
10199
string="Product attribute"
102-
attrs="{'invisible':[('question_type','!=','field')]}"
100+
invisible="question_tupe != 'field'"
103101
>
104102
<group>
105103
<group>
@@ -122,7 +120,7 @@
122120
</page>
123121
<page
124122
string="Custom response"
125-
attrs="{'invisible':[('question_type','!=','custom')]}"
123+
invisible="question_type != 'custom'"
126124
>
127125
<field
128126
name="answer_ids"
@@ -139,7 +137,7 @@
139137
<div
140138
class="alert alert-info"
141139
role="alert"
142-
attrs="{'invisible': [('answer_ids','!=', False)]}"
140+
invisible="not answer_ids"
143141
>
144142
you need to save the question before you can set the default answer.
145143
</div>
@@ -150,10 +148,7 @@
150148
</group>
151149
</group>
152150
</page>
153-
<page
154-
string="Values"
155-
attrs="{'invisible':[('question_type','!=','logical')]}"
156-
>
151+
<page string="Values" invisible="question_type != 'logical'">
157152
<group>
158153
<group>
159154
<label for="logical_default_values" />

0 commit comments

Comments
 (0)