ir_cron_views.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- ir.cron -->
  4. <record id="ir_cron_view_form" model="ir.ui.view">
  5. <field name="name">ir.cron.view.form</field>
  6. <field name="model">ir.cron</field>
  7. <field name="mode">primary</field>
  8. <field name="inherit_id" ref="base.view_server_action_form"/>
  9. <field name="arch" type="xml">
  10. <xpath expr="//button[@name='create_action']" position="replace">
  11. <button name="method_direct_trigger" type="object" string="Run Manually" class="oe_highlight" attrs="{'invisible': [('state', '!=', 'code')]}"/>
  12. </xpath>
  13. <xpath expr="//button[@name='unlink_action']" position="replace">
  14. </xpath>
  15. <xpath expr="//button[@name='run']" position="replace">
  16. </xpath>
  17. <xpath expr="//group[@name='action_content']" position="inside">
  18. <field name="user_id"/>
  19. <label for="interval_number" string="Execute Every"/>
  20. <div>
  21. <field name="interval_number" class="oe_inline"/>
  22. <field name="interval_type" class="oe_inline"/>
  23. </div>
  24. <field name="active" widget="boolean_toggle"/>
  25. <field name="nextcall"/>
  26. <field name="numbercall"/>
  27. <field name="priority"/>
  28. <field name="doall"/>
  29. </xpath>
  30. <field name="state" position="attributes">
  31. <attribute name="invisible">1</attribute>
  32. </field>
  33. </field>
  34. </record>
  35. <record id="ir_cron_view_tree" model="ir.ui.view">
  36. <field name="model">ir.cron</field>
  37. <field name="arch" type="xml">
  38. <tree string="Scheduled Actions" decoration-muted="(not active)">
  39. <field name="priority"/>
  40. <field name="name"/>
  41. <field name="model_id"/>
  42. <field name="nextcall"/>
  43. <field name="interval_number"/>
  44. <field name="interval_type"/>
  45. <field name="numbercall"/>
  46. <field name="user_id" invisible="1"/>
  47. <field name="active"/>
  48. </tree>
  49. </field>
  50. </record>
  51. <record model="ir.ui.view" id="ir_cron_view_calendar">
  52. <field name="model">ir.cron</field>
  53. <field name="priority" eval="2"/>
  54. <field name="arch" type="xml">
  55. <calendar string="Scheduled Actions" date_start="nextcall" color="user_id">
  56. <field name="name"/>
  57. <field name="user_id" filters="1" invisible="1"/>
  58. </calendar>
  59. </field>
  60. </record>
  61. <record id="ir_cron_view_search" model="ir.ui.view">
  62. <field name="model">ir.cron</field>
  63. <field name="arch" type="xml">
  64. <search string="Scheduled Actions">
  65. <field name="name" string="Scheduled Action"/>
  66. <field name="user_id"/>
  67. <field name="model_id"/>
  68. <field name="nextcall"/>
  69. <field name="active"/>
  70. <separator/>
  71. <filter string="All" name="all" domain="['|', ('active', '=', False), ('active', '=', True)]" />
  72. <separator/>
  73. <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
  74. <group expand="0" string="Group By">
  75. <filter string="User" name="user" domain="[]" context="{'group_by': 'user_id'}"/>
  76. <filter string="Execution" name="execution" domain="[]" context="{'group_by': 'nextcall'}" />
  77. <filter string="Model" name="groupby_model_id" domain="[]" context="{'group_by': 'model_id'}"/>
  78. </group>
  79. </search>
  80. </field>
  81. </record>
  82. <record id="ir_cron_act" model="ir.actions.act_window">
  83. <field name="name">Scheduled Actions</field>
  84. <field name="res_model">ir.cron</field>
  85. <field name="view_mode">tree,form,calendar</field>
  86. <field name="context">{'search_default_all': 1}</field>
  87. <field name="view_id" ref="ir_cron_view_tree"/>
  88. </record>
  89. <menuitem id="menu_ir_cron_act"
  90. parent="base.menu_automation"
  91. action="ir_cron_act"
  92. sequence="2"/>
  93. </odoo>