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.

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