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.

95 lines
3.7 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_backup_conf_form" model="ir.ui.view">
  4. <field name="model">db.backup</field>
  5. <field name="arch" type="xml">
  6. <form>
  7. <header>
  8. <button name="action_backup" type="object" string="Execute backup" class="oe_highlight"/>
  9. </header>
  10. <div class="oe_title">
  11. <h1><field name="name"/></h1>
  12. </div>
  13. <group string="Basic backup configuration">
  14. <field name="folder"/>
  15. <field name="days_to_keep"/>
  16. <field name="method"/>
  17. <field name="backup_format"/>
  18. </group>
  19. <div attrs="{'invisible': [('method', '!=', 'sftp')]}">
  20. <div class="bg-warning">
  21. <h3>Warning:</h3>
  22. Use SFTP with caution! This writes files to external servers under the path you specify.
  23. </div>
  24. <group string="SFTP Settings">
  25. <field name="sftp_host" placeholder="sftp.example.com"/>
  26. <field name="sftp_port"/>
  27. <field name="sftp_user" placeholder="john"/>
  28. <field name="sftp_password"/>
  29. <field
  30. name="sftp_private_key"
  31. placeholder="/home/odoo/.ssh/id_rsa"/>
  32. <button
  33. name="action_sftp_test_connection"
  34. type="object"
  35. string="Test SFTP Connection"
  36. icon="fa-television"/>
  37. </group>
  38. </div>
  39. <separator string="Help" colspan="2"/>
  40. <div>
  41. Automatic backups of the database can be scheduled as follows:
  42. <ol>
  43. <li>Go to Settings / Technical / Automation / Scheduled Actions.</li>
  44. <li>Search the action named 'Backup scheduler'.</li>
  45. <li>Set the scheduler to active and fill in how often you want backups generated.</li>
  46. </ol>
  47. </div>
  48. </form>
  49. </field>
  50. </record>
  51. <record id="view_backup_conf_tree" model="ir.ui.view">
  52. <field name="model">db.backup</field>
  53. <field name="arch" type="xml">
  54. <tree>
  55. <field name="name"/>
  56. <field name="folder"/>
  57. <field name="days_to_keep"/>
  58. </tree>
  59. </field>
  60. </record>
  61. <record id="view_backup_conf_search" model="ir.ui.view">
  62. <field name="model">db.backup</field>
  63. <field name="arch" type="xml">
  64. <search>
  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.next_id_9"
  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="type">ir.actions.server</field>
  83. <field name="model_id" ref="model_db_backup" />
  84. <field name="binding_model_id" ref="model_db_backup" />
  85. <field name="state">code</field>
  86. <field name="code">records.action_backup()</field>
  87. </record>
  88. </odoo>