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.

107 lines
4.0 KiB

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