|
7 | 7 | <field name="name">kpi.threshold.range.tree</field>
|
8 | 8 | <field name="model">kpi.threshold.range</field>
|
9 | 9 | <field name="arch" type="xml">
|
10 |
| - <tree string="Ranges" decoration-danger="invalid_message"> |
| 10 | + <tree decoration-danger="invalid_message"> |
11 | 11 | <field name="name" />
|
12 | 12 | <field name="min_value" />
|
13 | 13 | <field name="max_value" />
|
14 |
| - <field name="color" widget="color" /> |
| 14 | + <field name="color" widget="color" readonly="1" /> |
15 | 15 | <field name="invalid_message" />
|
16 | 16 | <field name="company_id" groups="base.group_multi_company" />
|
17 | 17 | </tree>
|
|
39 | 39 | <field
|
40 | 40 | name="min_fixed_value"
|
41 | 41 | colspan="3"
|
42 |
| - attrs="{'invisible' : [('min_type', '!=', 'static')]}" |
| 42 | + invisible="min_type != 'static'" |
43 | 43 | />
|
44 | 44 | <field
|
45 | 45 | name="min_dbsource_id"
|
| 46 | + invisible="min_type != 'external'" |
46 | 47 | colspan="3"
|
47 |
| - attrs="{'invisible' : [('min_type', '!=', 'external')]}" |
48 | 48 | />
|
49 | 49 | <field
|
50 | 50 | name="min_code"
|
51 | 51 | colspan="6"
|
52 |
| - attrs="{'invisible' : [('min_type', 'not in', ('local','external','python'))]}" |
53 |
| - /> |
54 |
| - <field |
55 |
| - name="min_error" |
56 |
| - colspan="6" |
57 |
| - attrs="{'invisible': [('min_error', '=', False)]}" |
| 52 | + invisible="min_type not in ('local', 'external', 'python')" |
58 | 53 | />
|
| 54 | + <field name="min_error" colspan="6" invisible="not min_error" /> |
59 | 55 | <newline />
|
60 | 56 | <separator string="Maximum" />
|
61 | 57 | <newline />
|
62 | 58 | <field name="max_type" colspan="3" />
|
63 | 59 | <field
|
64 | 60 | name="max_fixed_value"
|
65 | 61 | colspan="3"
|
66 |
| - attrs="{'invisible' : [('max_type', '!=', 'static')]}" |
| 62 | + invisible="max_type != 'static'" |
67 | 63 | />
|
68 | 64 | <field
|
69 | 65 | name="max_dbsource_id"
|
70 | 66 | colspan="3"
|
71 |
| - attrs="{'invisible' : [('max_type', '!=', 'external')]}" |
| 67 | + invisible="max_type != 'external'" |
72 | 68 | />
|
73 | 69 | <newline />
|
74 | 70 | <field
|
75 | 71 | name="max_code"
|
76 | 72 | colspan="6"
|
77 |
| - attrs="{'invisible' : [('max_type', 'not in', ('local','external','python'))]}" |
| 73 | + invisible="max_type not in ('local', 'external', 'python')" |
78 | 74 | />
|
79 | 75 | <newline />
|
80 |
| - <field |
81 |
| - name="max_error" |
82 |
| - colspan="6" |
83 |
| - attrs="{'invisible': [('max_error', '=', False)]}" |
84 |
| - /> |
| 76 | + <field name="max_error" colspan="6" invisible="not max_error" /> |
85 | 77 | <newline />
|
86 | 78 | </group>
|
87 | 79 | <group col="6" colspan="6">
|
88 | 80 | <separator string="Thresholds" colspan="4" />
|
89 | 81 | <field name="threshold_ids" nolabel="1" colspan="4" />
|
90 | 82 | <separator
|
91 | 83 | string="Errors"
|
92 |
| - attrs="{'invisible' : [('invalid_message', '=', False)]}" |
| 84 | + invisible="not invalid_message" |
93 | 85 | colspan="4"
|
94 | 86 | />
|
95 | 87 | <field
|
96 | 88 | name="invalid_message"
|
97 | 89 | nolabel="1"
|
98 |
| - attrs="{'invisible' : [('invalid_message', '=', False)]}" |
| 90 | + invisible="not invalid_message" |
99 | 91 | colspan="4"
|
100 | 92 | />
|
101 | 93 | </group>
|
|
0 commit comments