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.

108 lines
4.1 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. </form>
  46. </field>
  47. </record>
  48. <record model="ir.ui.view" id="view_backup_conf_tree">
  49. <field name="name">Automated Backups</field>
  50. <field name="model">db.backup</field>
  51. <field name="type">tree</field>
  52. <field name="arch" type="xml">
  53. <tree string="Backups">
  54. <field name='name'/>
  55. <field name='folder'/>
  56. <field name="sftp_host"/>
  57. </tree>
  58. </field>
  59. </record>
  60. <record model="ir.ui.view" id="view_backup_conf_search">
  61. <field name="name">Automated Backups</field>
  62. <field name="model">db.backup</field>
  63. <field name="type">search</field>
  64. <field name="arch" type="xml">
  65. <search string="Search options">
  66. <field name='name'/>
  67. <field name='folder'/>
  68. <field name="sftp_host"/>
  69. </search>
  70. </field>
  71. </record>
  72. <act_window
  73. name="Automated Backups"
  74. id="action_backup_conf_form"
  75. res_model="db.backup"/>
  76. <menuitem
  77. parent="base.menu_config"
  78. action="action_backup_conf_form"
  79. id="backup_conf_menu"/>
  80. <!-- Execute backup from "More" menu -->
  81. <record id="action_server_backup" model="ir.actions.server">
  82. <field name="name">Execute backup(s)</field>
  83. <field name="model_id" ref="model_db_backup"/>
  84. <field name="code">
  85. object.action_backup()
  86. </field>
  87. </record>
  88. <record model="ir.values" id="action_backup">
  89. <field name="name">Execute backup(s)</field>
  90. <field name="action_id" ref="action_server_backup" />
  91. <field
  92. name="value"
  93. eval="'ir.actions.server,%d' % ref('action_server_backup')" />
  94. <field name="key">action</field>
  95. <field name="model_id" ref="model_db_backup" />
  96. <field name="model">db.backup</field>
  97. <field name="key2">client_action_multi</field>
  98. </record>
  99. </data>
  100. </openerp>