OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
6.2 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_report_async_tree" model="ir.ui.view">
  4. <field name="name">report.async.tree</field>
  5. <field name="model">report.async</field>
  6. <field name="arch" type="xml">
  7. <tree string="Report Center">
  8. <field name="action_id"/>
  9. <button type="object" name="run_now" string="Run Now" icon="fa-bolt"/>
  10. <button type="object" name="run_async" string="Run Background" icon="fa-cogs"
  11. attrs="{'invisible': [('allow_async', '=', False)]}"/>
  12. <button type="object" name="view_files" string="Files" icon="fa-copy"
  13. attrs="{'invisible': [('allow_async', '=', False)]}"/>
  14. <field name="allow_async" invisible="1"/>
  15. <field name="job_status"
  16. attrs="{'invisible': [('allow_async', '=', False)]}"/>
  17. <field name="email_notify"/>
  18. </tree>
  19. </field>
  20. </record>
  21. <record id="view_report_async_form" model="ir.ui.view">
  22. <field name="name">report.async.form</field>
  23. <field name="model">report.async</field>
  24. <field name="arch" type="xml">
  25. <form>
  26. <div class="alert alert-warning"
  27. role="alert"
  28. attrs="{'invisible': ['|', ('job_status', 'in', ['done', 'failed', False]),
  29. ('allow_async', '=', False)]}"
  30. style="margin-bottom:0px;">
  31. <p>
  32. The report will be running by <i class="fa fa-cogs"/>
  33. <b>job</b>, and will be available at
  34. <i class="fa fa-copy"/><b> Files</b>
  35. </p>
  36. </div>
  37. <div class="alert alert-danger"
  38. role="alert"
  39. attrs="{'invisible': ['|', ('job_status', '!=', 'failed'),
  40. ('allow_async', '=', False)]}"
  41. style="margin-bottom:0px;">
  42. <p>
  43. The last <i class="fa fa-cogs"/> <b>running job</b> was failed.
  44. Please contact your system administrator.
  45. </p>
  46. </div>
  47. <div class="alert alert-success"
  48. role="alert"
  49. attrs="{'invisible': ['|', ('job_status', '!=', 'done'),
  50. ('allow_async', '=', False)]}"
  51. style="margin-bottom:0px;">
  52. <p>
  53. The last <i class="fa fa-cogs"/> <b>running job</b> was succeed.
  54. You can check the result in <i class="fa fa-copy"/><b> Files</b>
  55. </p>
  56. </div>
  57. <sheet>
  58. <div class="oe_read_only oe_right oe_button_box" name="buttons">
  59. <button type="object" name="run_now" string="Run Now" icon="fa-bolt"/>
  60. <button type="object" name="run_async" string="Run Background" icon="fa-cogs"
  61. attrs="{'invisible': [('allow_async', '=', False)]}"/>
  62. <button type="object" name="view_files" string="Files" icon="fa-copy"
  63. attrs="{'invisible': [('allow_async', '=', False)]}"/>
  64. <button type="object" name="view_jobs" string="Jobs" icon="fa-align-justify"
  65. groups="queue_job.group_queue_job_manager"
  66. attrs="{'invisible': [('allow_async', '=', False)]}"/>
  67. </div>
  68. <group>
  69. <group>
  70. <field name="action_id" options="{'no_open': True, 'no_create_edit': True}" />
  71. <field name="allow_async"/>
  72. <field name="email_notify"
  73. attrs="{'invisible': [('allow_async', '=', False)]}"/>
  74. </group>
  75. <group>
  76. <field name="job_status"
  77. attrs="{'invisible': [('allow_async', '=', False)]}"/>
  78. <field name="group_ids" widget="many2many_tags"/>
  79. </group>
  80. <group name="job_info" string="Last Run Job Error" colspan="2"
  81. attrs="{'invisible': ['|', ('job_info', '=', False), ('allow_async', '=', False)]}">
  82. <field nolabel="1" name="job_info"/>
  83. </group>
  84. </group>
  85. </sheet>
  86. </form>
  87. </field>
  88. </record>
  89. <record id="view_report_async_search" model="ir.ui.view">
  90. <field name="name">report.async.search</field>
  91. <field name="model">report.async</field>
  92. <field name="arch" type="xml">
  93. <search string="Report Center">
  94. <field name="action_id"/>
  95. </search>
  96. </field>
  97. </record>
  98. <record id="action_report_async" model="ir.actions.act_window">
  99. <field name="name">Report Center</field>
  100. <field name="type">ir.actions.act_window</field>
  101. <field name="res_model">report.async</field>
  102. <field name="view_type">form</field>
  103. <field name="help">Run reports asyncronously</field>
  104. </record>
  105. <menuitem
  106. id="menu_report_async"
  107. parent="base.menu_board_root"
  108. action="action_report_async"
  109. sequence="10"/>
  110. <record id="action_view_files" model="ir.actions.act_window">
  111. <field name="name">Report Files</field>
  112. <field name="type">ir.actions.act_window</field>
  113. <field name="res_model">ir.attachment</field>
  114. <field name="view_type">form</field>
  115. <field name="view_id" eval="False"/>
  116. <field name="search_view_id" ref="base.view_attachment_search"/>
  117. <field name="view_mode">kanban,tree,form</field>
  118. <field name="domain">[('res_model', '=', 'report.async'), ('create_uid', '=', uid)]</field>
  119. <field name="help" type="html">
  120. <p class="o_view_nocontent_smiling_face">
  121. No files found
  122. </p>
  123. </field>
  124. </record>
  125. </odoo>