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
5.7 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">Configure Backup</field>
  6. <field name="model">db.backup</field>
  7. <field name="type">form</field>
  8. <field name="arch" type="xml">
  9. <form string="Test">
  10. <group col="4" colspan="4">
  11. <separator col="2" string="Local backup configuration"/>
  12. </group>
  13. <group>
  14. <field name="host" colspan="2"/>
  15. <field name="securehost" colspan="2"/>
  16. <field name="name"/>
  17. <field name="port"/>
  18. <field name="adminpassword" password="True"/>
  19. <field name="bkp_dir"/>
  20. <field name="autoremove"/>
  21. <field name="daystokeep" attrs="{'invisible': [('autoremove','=',False)]}"/>
  22. </group>
  23. <group col="4" colspan="4">
  24. <separator col="2" string="SFTP"/>
  25. </group>
  26. <div
  27. style="width:50%;border-radius:10px;
  28. margin: 10px 0px;
  29. padding:15px 10px 15px 10px;
  30. background-repeat:
  31. no-repeat;background-position: 10px center;
  32. color: #9F6000;background-color: #FEEFB3;"
  33. attrs="{'invisible': [('sftpwrite','=',False)]}">
  34. <b>Warning:</b>
  35. Use SFTP with caution! This writes files to external servers under the path you specify.
  36. </div>
  37. <group>
  38. <field name="sftpwrite"/>
  39. <field name="sftpip" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
  40. <field name="sftpport" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
  41. <field name="sftpusername" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
  42. <field name="sftppassword" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}" password="True"/>
  43. <field name="sftppath" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}" placeholder="For example: /odoo/backups/"/>
  44. <field name="daystokeepsftp" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
  45. <field name="sendmailsftpfail" attrs="{'invisible': [('sftpwrite','=',False)]}"/>
  46. <field name="emailtonotify" attrs="{'invisible':['|',('sendmailsftpfail', '==', False),
  47. ('sftpwrite', '==', False)],'required':[('sendmailsftpfail', '==', True)]}"/>
  48. <button name="test_sftp_connection" type="object" attrs="{'invisible': [('sftpwrite','=',False)]}" string="Test SFTP Connection" icon="gtk-network"/>
  49. </group>
  50. <separator string="Help" colspan="2"/>
  51. <div>
  52. This configures the scheduler for automatic backup of the given database running on given host at given port on regular intervals.
  53. <br/>
  54. Automatic backups of the database can be scheduled as follows:
  55. <ol>
  56. <li>Go to Settings / Technical / Automation / Scheduled Actions.</li>
  57. <li>Search the action named 'Backup scheduler'.</li>
  58. <li>Set the scheduler to active and fill in how often you want backups generated.</li>
  59. </ol>
  60. </div>
  61. </form>
  62. </field>
  63. </record>
  64. <record model="ir.ui.view" id="view_backup_conf_tree">
  65. <field name="name">Configure Backup</field>
  66. <field name="model">db.backup</field>
  67. <field name="type">tree</field>
  68. <field name="arch" type="xml">
  69. <tree string="Backups">
  70. <field name='host'/>
  71. <field name='port'/>
  72. <field name='name'/>
  73. <field name='bkp_dir'/>
  74. <field name="autoremove"/>
  75. <field name="sftpip"/>
  76. </tree>
  77. </field>
  78. </record>
  79. <record model="ir.ui.view" id="view_backup_conf_search">
  80. <field name="name">Configure Backup</field>
  81. <field name="model">db.backup</field>
  82. <field name="type">search</field>
  83. <field name="arch" type="xml">
  84. <search string="Search options">
  85. <field name='host'/>
  86. <field name='port'/>
  87. <field name='name'/>
  88. <field name='bkp_dir'/>
  89. <field name="autoremove"/>
  90. <field name="sftpip"/>
  91. </search>
  92. </field>
  93. </record>
  94. <record model="ir.actions.act_window" id="action_backup_conf_form">
  95. <field name="name">Configure Backup</field>
  96. <field name="res_model">db.backup</field>
  97. <field name="view_type">form</field>
  98. <field name='view_mode'>tree,form</field>
  99. <field name='view_id' ref='view_backup_conf_tree'/>
  100. </record>
  101. <menuitem parent="base.menu_config" action="action_backup_conf_form" id="backup_conf_menu"/>
  102. </data>
  103. </openerp>