|
12 | 12 | name="run_async"
|
13 | 13 | string="Run Background"
|
14 | 14 | icon="fa-cogs"
|
15 |
| - attrs="{'invisible': [('allow_async', '=', False)]}" |
| 15 | + invisible="not allow_async" |
16 | 16 | />
|
17 | 17 | <button
|
18 | 18 | type="object"
|
19 | 19 | name="view_files"
|
20 | 20 | string="Files"
|
21 | 21 | icon="fa-copy"
|
22 |
| - attrs="{'invisible': [('allow_async', '=', False)]}" |
23 |
| - /> |
24 |
| - <field name="allow_async" invisible="1" /> |
25 |
| - <field |
26 |
| - name="job_status" |
27 |
| - attrs="{'invisible': [('allow_async', '=', False)]}" |
| 22 | + invisible="not allow_async" |
28 | 23 | />
|
| 24 | + <field name="allow_async" column_invisible="1" /> |
| 25 | + <field name="job_status" optional="hide" /> |
29 | 26 | <field name="email_notify" />
|
30 | 27 | </tree>
|
31 | 28 | </field>
|
|
38 | 35 | <div
|
39 | 36 | class="alert alert-warning"
|
40 | 37 | role="alert"
|
41 |
| - attrs="{'invisible': ['|', ('job_status', 'in', ['done', 'failed', False]), |
42 |
| - ('allow_async', '=', False)]}" |
| 38 | + invisible="not allow_async or (job_status in ['done', 'failed', False])" |
43 | 39 | style="margin-bottom:0px;"
|
44 | 40 | >
|
45 | 41 | <p>
|
|
51 | 47 | <div
|
52 | 48 | class="alert alert-danger"
|
53 | 49 | role="alert"
|
54 |
| - attrs="{'invisible': ['|', ('job_status', '!=', 'failed'), |
55 |
| - ('allow_async', '=', False)]}" |
| 50 | + invisible="not allow_async or job_status != 'failed'" |
56 | 51 | style="margin-bottom:0px;"
|
57 | 52 | >
|
58 | 53 | <p>
|
|
63 | 58 | <div
|
64 | 59 | class="alert alert-success"
|
65 | 60 | role="alert"
|
66 |
| - attrs="{'invisible': ['|', ('job_status', '!=', 'done'), |
67 |
| - ('allow_async', '=', False)]}" |
| 61 | + invisible="not allow_async or job_status != 'done'" |
68 | 62 | style="margin-bottom:0px;"
|
69 | 63 | >
|
70 | 64 | <p>
|
|
75 | 69 | </p>
|
76 | 70 | </div>
|
77 | 71 | <sheet>
|
78 |
| - <div class="oe_read_only oe_right oe_button_box" name="buttons"> |
| 72 | + <div class="oe_button_box" name="button_box"> |
79 | 73 | <button
|
80 | 74 | type="object"
|
81 | 75 | name="run_now"
|
|
87 | 81 | name="run_async"
|
88 | 82 | string="Run Background"
|
89 | 83 | icon="fa-cogs"
|
90 |
| - attrs="{'invisible': [('allow_async', '=', False)]}" |
| 84 | + invisible="not allow_async" |
91 | 85 | />
|
92 | 86 | <button
|
93 | 87 | type="object"
|
94 | 88 | name="view_files"
|
95 | 89 | string="Files"
|
96 | 90 | icon="fa-copy"
|
97 |
| - attrs="{'invisible': [('allow_async', '=', False)]}" |
| 91 | + invisible="not allow_async" |
98 | 92 | />
|
99 | 93 | <button
|
100 | 94 | type="object"
|
101 | 95 | name="view_jobs"
|
102 | 96 | string="Jobs"
|
103 | 97 | icon="fa-align-justify"
|
104 | 98 | groups="queue_job.group_queue_job_manager"
|
105 |
| - attrs="{'invisible': [('allow_async', '=', False)]}" |
| 99 | + invisible="not allow_async" |
106 | 100 | />
|
107 | 101 | </div>
|
108 | 102 | <group>
|
|
113 | 107 | context="{'access_sudo': True}"
|
114 | 108 | />
|
115 | 109 | <field name="allow_async" />
|
116 |
| - <field |
117 |
| - name="email_notify" |
118 |
| - attrs="{'invisible': [('allow_async', '=', False)]}" |
119 |
| - /> |
| 110 | + <field name="email_notify" invisible="not allow_async" /> |
120 | 111 | </group>
|
121 | 112 | <group>
|
122 |
| - <field |
123 |
| - name="job_status" |
124 |
| - attrs="{'invisible': [('allow_async', '=', False)]}" |
125 |
| - /> |
| 113 | + <field name="job_status" invisible="not allow_async" /> |
126 | 114 | <field name="group_ids" widget="many2many_tags" />
|
127 | 115 | </group>
|
128 | 116 | <group
|
129 | 117 | name="job_info"
|
130 | 118 | string="Last Run Job Error"
|
131 | 119 | colspan="2"
|
132 |
| - attrs="{'invisible': ['|', ('job_info', '=', False), ('allow_async', '=', False)]}" |
| 120 | + invisible="not allow_async or not job_info" |
133 | 121 | >
|
134 | 122 | <field nolabel="1" name="job_info" />
|
135 | 123 | </group>
|
|
155 | 143 | </record>
|
156 | 144 | <menuitem
|
157 | 145 | id="menu_report_async"
|
158 |
| - parent="base.menu_board_root" |
| 146 | + parent="spreadsheet_dashboard.spreadsheet_dashboard_menu_root" |
159 | 147 | action="action_report_async"
|
160 | 148 | sequence="10"
|
161 | 149 | />
|
|
0 commit comments