|
29 | 29 | /> |
30 | 30 | </header> |
31 | 31 | <field name="locked" invisible="True" /> |
| 32 | + <field name="has_ongoing_jobs" invisible="1" /> |
| 33 | + <field name="ongoing_job_generator_id" invisible="1" /> |
32 | 34 | <div |
33 | 35 | class="alert alert-warning text-center o_form_header" |
34 | 36 | role="status" |
|
45 | 47 | string="Refresh" |
46 | 48 | /> |
47 | 49 | </div> |
| 50 | + <div |
| 51 | + class="alert alert-info text-center o_form_header" |
| 52 | + role="status" |
| 53 | + invisible="not has_ongoing_jobs or id == ongoing_job_generator_id" |
| 54 | + > |
| 55 | + <span>Info: Another demo data generation is currently in progress: </span> |
| 56 | + <field name="ongoing_job_generator_id" class="o_stat_value" readonly="1" /> |
| 57 | + <button |
| 58 | + name="refresh_page" |
| 59 | + type="object" |
| 60 | + class="btn-link" |
| 61 | + icon="fa-refresh" |
| 62 | + title="Refresh Page" |
| 63 | + string="Refresh" |
| 64 | + /> |
| 65 | + </div> |
48 | 66 | <field name="locale_origin_faker_locale" invisible="1" /> |
49 | 67 | <div |
50 | 68 | class="alert alert-warning text-center o_form_header" |
|
63 | 81 | class="oe_stat_button" |
64 | 82 | icon="fa-thumbs-o-up" |
65 | 83 | name="generate_demo_data" |
66 | | - invisible="state != 'draft'" |
| 84 | + invisible="state != 'draft' or has_ongoing_jobs" |
67 | 85 | > |
68 | 86 | <div class="o_form_field o_stat_info"> |
69 | 87 | <span class="o_stat_text">Generate</span> |
|
302 | 320 | </form> |
303 | 321 | </field> |
304 | 322 | </page> |
305 | | - <page string="Queue Jobs" invisible="not queue_job_ids"> |
306 | | - <field name="queue_job_count" invisible="1" /> |
307 | | - <group> |
308 | | - <div class="alert alert-info" role="alert"> |
309 | | - <strong>Queue Jobs:</strong> |
310 | | - <span> |
311 | | - <field name="queue_job_count" readonly="1" /> |
312 | | - job(s) created for this generation |
313 | | - </span> |
314 | | - </div> |
315 | | - </group> |
316 | | - <field name="queue_job_ids" readonly="1"> |
317 | | - <tree create="false" edit="false" delete="false"> |
318 | | - <field name="date_created" string="Created" /> |
319 | | - <field name="date_started" string="Started" /> |
320 | | - <field name="date_enqueued" string="Enqueued" /> |
321 | | - <field name="date_done" string="Done" /> |
322 | | - <field name="state" /> |
| 323 | + <page string="Queue Jobs" name="queue_jobs" invisible="not queue_job_ids"> |
| 324 | + <field name="queue_job_ids" nolabel="1" readonly="1"> |
| 325 | + <tree> |
323 | 326 | <field name="method_name" /> |
324 | | - <field name="result" /> |
| 327 | + <field |
| 328 | + name="state" |
| 329 | + decoration-info="state=='pending'" |
| 330 | + decoration-warning="state=='enqueued'" |
| 331 | + decoration-primary="state=='started'" |
| 332 | + decoration-success="state=='done'" |
| 333 | + decoration-danger="state=='failed'" |
| 334 | + widget="badge" |
| 335 | + /> |
| 336 | + <field name="date_created" /> |
| 337 | + <field name="date_started" /> |
| 338 | + <field name="date_done" /> |
| 339 | + <field name="exc_info" /> |
325 | 340 | </tree> |
| 341 | + <form> |
| 342 | + <header> |
| 343 | + <field name="state" widget="statusbar" /> |
| 344 | + </header> |
| 345 | + <group> |
| 346 | + <group> |
| 347 | + <field name="name" /> |
| 348 | + <field name="model_name" /> |
| 349 | + <field name="method_name" /> |
| 350 | + <field name="res_model" /> |
| 351 | + <field name="res_id" /> |
| 352 | + </group> |
| 353 | + <group> |
| 354 | + <field name="date_created" /> |
| 355 | + <field name="date_enqueued" /> |
| 356 | + <field name="date_started" /> |
| 357 | + <field name="date_done" /> |
| 358 | + <field name="priority" /> |
| 359 | + </group> |
| 360 | + </group> |
| 361 | + <group string="Exception Information" invisible="not exc_info"> |
| 362 | + <field name="exc_info" nolabel="1" readonly="1" /> |
| 363 | + </group> |
| 364 | + </form> |
326 | 365 | </field> |
327 | 366 | </page> |
328 | 367 | </notebook> |
|
0 commit comments