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
5.7 KiB
108 lines
5.7 KiB
<?xml version="1.0"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<record model="ir.ui.view" id="view_backup_conf_form">
|
|
<field name="name">Configure Backup</field>
|
|
<field name="model">db.backup</field>
|
|
<field name="type">form</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Test">
|
|
<group col="4" colspan="4">
|
|
<separator col="2" string="Local backup configuration"/>
|
|
</group>
|
|
<group>
|
|
<field name="host" colspan="2"/>
|
|
<field name="securehost" colspan="2"/>
|
|
<field name="name"/>
|
|
<field name="port"/>
|
|
<field name="adminpassword" password="True"/>
|
|
<field name="bkp_dir"/>
|
|
<field name="autoremove"/>
|
|
<field name="daystokeep" attrs="{'invisible': [('autoremove','=',False)]}"/>
|
|
</group>
|
|
<group col="4" colspan="4">
|
|
<separator col="2" string="SFTP"/>
|
|
</group>
|
|
<div
|
|
style="width:50%;border-radius:10px;
|
|
margin: 10px 0px;
|
|
padding:15px 10px 15px 10px;
|
|
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>
|
|
<group>
|
|
<field name="sftpwrite"/>
|
|
<field name="sftpip" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
|
|
<field name="sftpport" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
|
|
<field name="sftpusername" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
|
|
<field name="sftppassword" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}" password="True"/>
|
|
<field name="sftppath" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}" placeholder="For example: /odoo/backups/"/>
|
|
<field name="daystokeepsftp" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
|
|
<field name="sendmailsftpfail" attrs="{'invisible': [('sftpwrite','=',False)]}"/>
|
|
<field name="emailtonotify" attrs="{'invisible':['|',('sendmailsftpfail', '==', False),
|
|
('sftpwrite', '==', False)],'required':[('sendmailsftpfail', '==', True)]}"/>
|
|
<button name="test_sftp_connection" type="object" attrs="{'invisible': [('sftpwrite','=',False)]}" string="Test SFTP Connection" icon="gtk-network"/>
|
|
</group>
|
|
<separator string="Help" colspan="2"/>
|
|
<div>
|
|
This configures the scheduler for automatic backup of the given database running on given host at given port on regular intervals.
|
|
<br/>
|
|
Automatic backups of the database can be scheduled as follows:
|
|
<ol>
|
|
<li>Go to Settings / Technical / Automation / Scheduled Actions.</li>
|
|
<li>Search the action named 'Backup scheduler'.</li>
|
|
<li>Set the scheduler to active and fill in how often you want backups generated.</li>
|
|
</ol>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="view_backup_conf_tree">
|
|
<field name="name">Configure Backup</field>
|
|
<field name="model">db.backup</field>
|
|
<field name="type">tree</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Backups">
|
|
<field name='host'/>
|
|
<field name='port'/>
|
|
<field name='name'/>
|
|
<field name='bkp_dir'/>
|
|
<field name="autoremove"/>
|
|
<field name="sftpip"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="view_backup_conf_search">
|
|
<field name="name">Configure Backup</field>
|
|
<field name="model">db.backup</field>
|
|
<field name="type">search</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search options">
|
|
<field name='host'/>
|
|
<field name='port'/>
|
|
<field name='name'/>
|
|
<field name='bkp_dir'/>
|
|
<field name="autoremove"/>
|
|
<field name="sftpip"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="action_backup_conf_form">
|
|
<field name="name">Configure Backup</field>
|
|
<field name="res_model">db.backup</field>
|
|
<field name="view_type">form</field>
|
|
<field name='view_mode'>tree,form</field>
|
|
<field name='view_id' ref='view_backup_conf_tree'/>
|
|
</record>
|
|
<menuitem parent="base.menu_config" action="action_backup_conf_form" id="backup_conf_menu"/>
|
|
|
|
</data>
|
|
</openerp>
|