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.
182 lines
8.7 KiB
182 lines
8.7 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
<odoo>
|
|
|
|
<data noupdate="1">
|
|
<!-- Schedule action for generating automatic database backup-->
|
|
<record id="ir_cron_auto_db_backup" model="ir.cron">
|
|
<field name="name">Backup : Automatic Database Backup</field>
|
|
<field name="model_id" ref="model_db_backup_configure"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model._schedule_auto_backup()</field>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">days</field>
|
|
<field name="numbercall">-1</field>
|
|
<field name="active">False</field>
|
|
</record>
|
|
|
|
</data>
|
|
|
|
<data>
|
|
<!-- Database backup operation Successful email template-->
|
|
<record id="mail_template_data_db_backup_successful" model="mail.template">
|
|
<field name="name">Database Backup: Notification Successful</field>
|
|
<field name="model_id" ref="auto_database_backup.model_db_backup_configure"/>
|
|
<field name="subject">Database Backup Successful: {{ object.db_name }}</field>
|
|
<field name="email_to">{{ object.user_id.email_formatted }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="margin: 0px; padding: 0px;">
|
|
<p style="margin: 0px;">
|
|
<span>Dear <t t-out="object.user_id.name"/>,
|
|
</span>
|
|
<br/>
|
|
<br/>
|
|
<span style="margin-top: 8px;">Backup of the database
|
|
<i>
|
|
<t t-out="object.db_name"/>
|
|
</i>
|
|
has been successfully generated and stored to
|
|
<t t-if="object.backup_destination == 'local'">
|
|
<i>Local</i>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'google_drive'">
|
|
<i>Google Drive</i>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'ftp'">
|
|
<i>FTP Server</i>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'sftp'">
|
|
<i>SFTP Server</i>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'dropbox'">
|
|
<i>Dropbox</i>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'onedrive'">
|
|
<i>Onedrive</i>
|
|
</t>
|
|
.
|
|
<br/>
|
|
<br/>
|
|
Database Name:
|
|
<t t-out="object.db_name"/>
|
|
<br/>
|
|
Destination:
|
|
<t t-if="object.backup_destination == 'local'">
|
|
Local
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'google_drive'">
|
|
Google Drive
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'ftp'">
|
|
FTP Server
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'sftp'">
|
|
SFTP Server
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'dropbox'">
|
|
Dropbox
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'onedrive'">
|
|
Onedrive
|
|
</t>
|
|
<t t-if="object.backup_destination in ('local', 'ftp', 'sftp', 'dropbox')">
|
|
<br/>
|
|
Backup Path:
|
|
<t t-if="object.backup_destination == 'local'">
|
|
<t t-out="object.backup_path"/>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'ftp'">
|
|
<t t-out="object.ftp_path"/>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'sftp'">
|
|
<t t-out="object.sftp_path"/>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'dropbox'">
|
|
<t t-out="object.dropbox_folder"/>
|
|
</t>
|
|
</t>
|
|
<br/>
|
|
Backup Type:
|
|
<t t-out="object.backup_format"/>
|
|
<br/>
|
|
Backup FileName:
|
|
<t t-out="object.backup_filename"/>
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Database backup operation failed email templated-->
|
|
<record id="mail_template_data_db_backup_failed" model="mail.template">
|
|
<field name="name">Database Backup: Notification Failed</field>
|
|
<field name="model_id" ref="auto_database_backup.model_db_backup_configure"/>
|
|
<field name="subject">Database Backup Failed: {{ object.db_name }}</field>
|
|
<field name="email_to">{{ object.user_id.email_formatted }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="margin: 0px; padding: 0px;">
|
|
<p style="margin: 0px;">
|
|
<span>Dear <t t-out="object.user_id.name"/>,
|
|
</span>
|
|
<br/>
|
|
<br/>
|
|
<span style="margin-top: 8px;">Backup generation of the database
|
|
<i>
|
|
<t t-out="object.db_name"/>
|
|
</i>
|
|
has been Failed.
|
|
<br/>
|
|
<br/>
|
|
Database Name: <t t-out="object.db_name"/>
|
|
<br/>
|
|
Destination:
|
|
<t t-if="object.backup_destination == 'local'">
|
|
Local
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'google_drive'">
|
|
Google Drive
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'ftp'">
|
|
FTP Server
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'sftp'">
|
|
SFTP Server
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'dropbox'">
|
|
Dropbox
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'onedrive'">
|
|
Onedrive
|
|
</t>
|
|
<t t-if="object.backup_destination in ('local', 'ftp', 'sftp', 'dropbox')">
|
|
<br/>
|
|
Backup Path:
|
|
<t t-if="object.backup_destination == 'local'">
|
|
<t t-out="object.backup_path"/>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'ftp'">
|
|
<t t-out="object.ftp_path"/>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'sftp'">
|
|
<t t-out="object.sftp_path"/>
|
|
</t>
|
|
<t t-elif="object.backup_destination == 'dropbox'">
|
|
<t t-out="object.dropbox_folder"/>
|
|
</t>
|
|
</t>
|
|
<br/>
|
|
Backup Type: <t t-out="object.backup_format"/>
|
|
<br/>
|
|
<br/>
|
|
<b>Error Message:</b>
|
|
<br/>
|
|
<i><t t-out="object.generated_exception"/></i>
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
|
|
|
|
</odoo>
|