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.

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