archetipo
9 years ago
3 changed files with 0 additions and 138 deletions
-
18auto_backup/backup_data.xml
-
112auto_backup/bkp_conf_view.xml
-
8auto_backup/model/backup_scheduler.py
@ -1,18 +0,0 @@ |
|||
<?xml version="1.0" ?> |
|||
<openerp> |
|||
<data noupdate="1"> |
|||
<record id="ir_cron_backupscheduler0" model="ir.cron"> |
|||
<field eval=""""schedule_backup"""" name="function"/> |
|||
<field eval=""""work_days"""" name="interval_type"/> |
|||
<field name="user_id" ref="base.user_root"/> |
|||
<field eval=""""Backup scheduler"""" name="name"/> |
|||
<field eval="-1" name="numbercall"/> |
|||
<field eval=""""2010-01-07 11:35:28"""" name="nextcall"/> |
|||
<field eval="5" name="priority"/> |
|||
<field eval="0" name="doall"/> |
|||
<field eval="False" name="active"/> |
|||
<field eval="1" name="interval_number"/> |
|||
<field eval=""""db.backup"""" name="model"/> |
|||
</record> |
|||
</data> |
|||
</openerp> |
@ -1,112 +0,0 @@ |
|||
<?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="name" /> |
|||
<field name="port" /> |
|||
<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> |
|||
<p style="font-size:18px;"> |
|||
Need more help? <a href="mailto:erp@vanroey.be">Contact us!</a> |
|||
</p> |
|||
</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> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue