|
35 | 35 | name="web_ribbon" |
36 | 36 | title="Archived" |
37 | 37 | bg_color="bg-danger" |
38 | | - attrs="{'invisible': [('active', '=', True)]}" |
| 38 | + invisible="active == True" |
39 | 39 | /> |
40 | 40 | <div class="oe_title"> |
41 | 41 | <label for="name" class="oe_edit_only" /> |
|
55 | 55 | <field name="question_type" /> |
56 | 56 | <field |
57 | 57 | name="is_automatic" |
58 | | - attrs="{'readonly': [('question_type', '=', 'logical')]}" |
| 58 | + readonly="question_type == 'logical'" |
59 | 59 | /> |
60 | 60 | <field name="automatic_save" /> |
61 | 61 | <field |
62 | 62 | name="conditional_question" |
63 | | - attrs="{'invisible': ['|', ('parent_id', '=', False), ('parent_question_type', '=', 'logical')]}" |
| 63 | + invisible="not parent_id or parent_question_type == 'logical'" |
64 | 64 | /> |
65 | 65 | </group> |
66 | 66 | <group> |
67 | 67 | <field |
68 | 68 | name="question" |
69 | | - attrs="{'invisible': [('is_automatic', '=', True)], 'required': [('is_automatic', '!=', True)]}" |
| 69 | + invisible="is_automatic == True" |
| 70 | + required="not is_automatic" |
70 | 71 | /> |
71 | 72 | <field |
72 | 73 | name="answer_required" |
73 | | - attrs="{'invisible': [('question_type', 'in', ['logical'])]}" |
| 74 | + invisible="question_type in ['logical']" |
74 | 75 | /> |
75 | 76 | <field name="sequence" /> |
76 | 77 | </group> |
77 | 78 | </group> |
78 | 79 | <notebook> |
79 | | - <page |
80 | | - string="Apply if" |
81 | | - attrs="{'invisible': [('conditional_question', '=', False)]}" |
82 | | - > |
| 80 | + <page string="Apply if" invisible="not conditional_question"> |
83 | 81 | <div class="alert alert-info" role="alert"> |
84 | 82 | This question and its children will be applied only if response to the |
85 | 83 | parent questions satisfy the following operator and value. |
|
88 | 86 | <field name="conditional_operator" /> |
89 | 87 | <field |
90 | 88 | name="conditional_expected_result" |
91 | | - attrs="{'invisible': [('parent_question_type', '!=', 'field')]}" |
| 89 | + invisible="parent_question_type != 'field'" |
92 | 90 | /> |
93 | 91 | <field |
94 | 92 | name="conditional_expected_result_answer_id" |
95 | 93 | domain="[('question_id', '=', parent_id)]" |
96 | | - attrs="{'invisible': [('parent_question_type', '!=', 'custom')]}" |
| 94 | + invisible="parent_question_type != 'custom'" |
97 | 95 | /> |
98 | 96 | </group> |
99 | 97 | </page> |
100 | 98 | <page |
101 | 99 | string="Product attribute" |
102 | | - attrs="{'invisible':[('question_type','!=','field')]}" |
| 100 | + invisible="question_tupe != 'field'" |
103 | 101 | > |
104 | 102 | <group> |
105 | 103 | <group> |
|
122 | 120 | </page> |
123 | 121 | <page |
124 | 122 | string="Custom response" |
125 | | - attrs="{'invisible':[('question_type','!=','custom')]}" |
| 123 | + invisible="question_type != 'custom'" |
126 | 124 | > |
127 | 125 | <field |
128 | 126 | name="answer_ids" |
|
139 | 137 | <div |
140 | 138 | class="alert alert-info" |
141 | 139 | role="alert" |
142 | | - attrs="{'invisible': [('answer_ids','!=', False)]}" |
| 140 | + invisible="not answer_ids" |
143 | 141 | > |
144 | 142 | you need to save the question before you can set the default answer. |
145 | 143 | </div> |
|
150 | 148 | </group> |
151 | 149 | </group> |
152 | 150 | </page> |
153 | | - <page |
154 | | - string="Values" |
155 | | - attrs="{'invisible':[('question_type','!=','logical')]}" |
156 | | - > |
| 151 | + <page string="Values" invisible="question_type != 'logical'"> |
157 | 152 | <group> |
158 | 153 | <group> |
159 | 154 | <label for="logical_default_values" /> |
|
0 commit comments