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.

113 lines
4.4 KiB

  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="view_backup_conf_form">
  5. <field name="name">Automated Backups</field>
  6. <field name="model">db.backup</field>
  7. <field name="type">form</field>
  8. <field name="arch" type="xml">
  9. <form>
  10. <h1><field name="name"/></h1>
  11. <group string="Basic backup configuration">
  12. <field name="folder"/>
  13. <field name="days_to_keep"/>
  14. <field name="method"/>
  15. <field name="tempdir" attrs="{'invisible': [('method', '!=', 'local')]}" groups="base.group_no_one" />
  16. </group>
  17. <div attrs="{'invisible': [('method', '!=', 'sftp')]}">
  18. <div class="bg-warning text-warning">
  19. <h3>Warning:</h3>
  20. Use SFTP with caution! This writes files to external servers under the path you specify.
  21. </div>
  22. <group string="SFTP Settings">
  23. <field name="sftp_host" placeholder="sftp.example.com"/>
  24. <field name="sftp_port"/>
  25. <field name="sftp_user" placeholder="john"/>
  26. <field name="sftp_password"/>
  27. <field
  28. name="sftp_private_key"
  29. placeholder="/home/odoo/.ssh/id_rsa"/>
  30. <button
  31. name="action_sftp_test_connection"
  32. type="object"
  33. string="Test SFTP Connection"
  34. icon="gtk-network"/>
  35. </group>
  36. </div>
  37. <separator string="Help" colspan="2"/>
  38. <div>
  39. Automatic backups of the database can be scheduled as follows:
  40. <ol>
  41. <li>Go to Settings / Technical / Automation / Scheduled Actions.</li>
  42. <li>Search the action named 'Backup scheduler'.</li>
  43. <li>Set the scheduler to active and fill in how often you want backups generated.</li>
  44. </ol>
  45. </div>
  46. <div class="oe_chatter">
  47. <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
  48. <field name="message_ids" widget="mail_thread"/>
  49. </div>
  50. </form>
  51. </field>
  52. </record>
  53. <record model="ir.ui.view" id="view_backup_conf_tree">
  54. <field name="name">Automated Backups</field>
  55. <field name="model">db.backup</field>
  56. <field name="type">tree</field>
  57. <field name="arch" type="xml">
  58. <tree string="Backups">
  59. <field name='name'/>
  60. <field name='folder'/>
  61. <field name="sftp_host"/>
  62. </tree>
  63. </field>
  64. </record>
  65. <record model="ir.ui.view" id="view_backup_conf_search">
  66. <field name="name">Automated Backups</field>
  67. <field name="model">db.backup</field>
  68. <field name="type">search</field>
  69. <field name="arch" type="xml">
  70. <search string="Search options">
  71. <field name='name'/>
  72. <field name='folder'/>
  73. <field name="sftp_host"/>
  74. </search>
  75. </field>
  76. </record>
  77. <act_window
  78. name="Automated Backups"
  79. id="action_backup_conf_form"
  80. res_model="db.backup"/>
  81. <menuitem
  82. parent="base.menu_config"
  83. action="action_backup_conf_form"
  84. id="backup_conf_menu"/>
  85. <!-- Execute backup from "More" menu -->
  86. <record id="action_server_backup" model="ir.actions.server">
  87. <field name="name">Execute backup(s)</field>
  88. <field name="model_id" ref="model_db_backup"/>
  89. <field name="code">
  90. object.action_backup()
  91. </field>
  92. </record>
  93. <record model="ir.values" id="action_backup">
  94. <field name="name">Execute backup(s)</field>
  95. <field name="action_id" ref="action_server_backup" />
  96. <field
  97. name="value"
  98. eval="'ir.actions.server,%d' % ref('action_server_backup')" />
  99. <field name="key">action</field>
  100. <field name="model_id" ref="model_db_backup" />
  101. <field name="model">db.backup</field>
  102. <field name="key2">client_action_multi</field>
  103. </record>
  104. </data>
  105. </openerp>