Browse Source

Mar 15 [UPDT] : Updated 'auto_database_backup'

pull/164/merge
AjmalCybro 1 year ago
parent
commit
bbf49d834e
  1. 2
      auto_database_backup/README.rst
  2. 3
      auto_database_backup/__init__.py
  3. 17
      auto_database_backup/__manifest__.py
  4. 22
      auto_database_backup/controllers/__init__.py
  5. 53
      auto_database_backup/controllers/auto_database_backup.py
  6. 41
      auto_database_backup/data/data.xml
  7. 17
      auto_database_backup/doc/RELEASE_NOTES.md
  8. 9
      auto_database_backup/models/__init__.py
  9. 932
      auto_database_backup/models/db_backup_configure.py
  10. 1
      auto_database_backup/security/ir.model.access.csv
  11. BIN
      auto_database_backup/static/description/assets/screenshots/add.png
  12. BIN
      auto_database_backup/static/description/assets/screenshots/amazon_s3_7.png
  13. BIN
      auto_database_backup/static/description/assets/screenshots/amazon_s3_8.png
  14. BIN
      auto_database_backup/static/description/assets/screenshots/amazon_s3_pci1.png
  15. BIN
      auto_database_backup/static/description/assets/screenshots/amazon_s3_pic 2.png
  16. BIN
      auto_database_backup/static/description/assets/screenshots/amazons3-1.png
  17. BIN
      auto_database_backup/static/description/assets/screenshots/amazons3_4.png
  18. BIN
      auto_database_backup/static/description/assets/screenshots/amazons3_5.png
  19. BIN
      auto_database_backup/static/description/assets/screenshots/amazons3_6.png
  20. BIN
      auto_database_backup/static/description/assets/screenshots/amazons3_7.png
  21. BIN
      auto_database_backup/static/description/assets/screenshots/amazons3_access.png
  22. BIN
      auto_database_backup/static/description/assets/screenshots/amazons3_pick 3.png
  23. BIN
      auto_database_backup/static/description/assets/screenshots/amazons3_signup.png
  24. BIN
      auto_database_backup/static/description/assets/screenshots/backup7.png
  25. BIN
      auto_database_backup/static/description/assets/screenshots/backup8.png
  26. BIN
      auto_database_backup/static/description/assets/screenshots/backup9.png
  27. BIN
      auto_database_backup/static/description/assets/screenshots/drive1.png
  28. BIN
      auto_database_backup/static/description/assets/screenshots/drive2.png
  29. BIN
      auto_database_backup/static/description/assets/screenshots/drive3.png
  30. BIN
      auto_database_backup/static/description/assets/screenshots/drive4.png
  31. BIN
      auto_database_backup/static/description/assets/screenshots/drive5.png
  32. BIN
      auto_database_backup/static/description/assets/screenshots/drop1.png
  33. BIN
      auto_database_backup/static/description/assets/screenshots/drop2.png
  34. BIN
      auto_database_backup/static/description/assets/screenshots/drop3.png
  35. BIN
      auto_database_backup/static/description/assets/screenshots/drop4.png
  36. BIN
      auto_database_backup/static/description/assets/screenshots/dropbox-1.png
  37. BIN
      auto_database_backup/static/description/assets/screenshots/dropbox-2.png
  38. BIN
      auto_database_backup/static/description/assets/screenshots/hero.gif
  39. BIN
      auto_database_backup/static/description/assets/screenshots/hero.png
  40. BIN
      auto_database_backup/static/description/assets/screenshots/newcloud1.png
  41. BIN
      auto_database_backup/static/description/assets/screenshots/newcloud2.png
  42. BIN
      auto_database_backup/static/description/assets/screenshots/newcloud2_ds.png
  43. BIN
      auto_database_backup/static/description/assets/screenshots/next_cloud-1.png
  44. BIN
      auto_database_backup/static/description/assets/screenshots/next_cloud2.png
  45. BIN
      auto_database_backup/static/description/assets/screenshots/next_cloud_9.png
  46. BIN
      auto_database_backup/static/description/assets/screenshots/nextcloud_4.png
  47. BIN
      auto_database_backup/static/description/assets/screenshots/nextcloud_5.png
  48. BIN
      auto_database_backup/static/description/assets/screenshots/nextcloud_6.png
  49. BIN
      auto_database_backup/static/description/assets/screenshots/nextcloud_create_3.png
  50. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive-1.png
  51. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive1.png
  52. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive2.png
  53. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive3.png
  54. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive4.png
  55. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive5.png
  56. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive6.png
  57. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive7.png
  58. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive8.png
  59. BIN
      auto_database_backup/static/description/assets/screenshots/onedrive9.png
  60. 644
      auto_database_backup/static/description/index.html
  61. 178
      auto_database_backup/views/db_backup_configure_views.xml
  62. 22
      auto_database_backup/wizard/__init__.py
  63. 59
      auto_database_backup/wizard/dropbox_auth_code.py
  64. 35
      auto_database_backup/wizard/dropbox_auth_code_views.xml
  65. BIN
      customize_settings.zip

2
auto_database_backup/README.rst

@ -19,7 +19,7 @@ Company
Credits
-------
* Developer:
(v14) Midilaj @ Cybrosys
(v14) Midilaj @ Cybrosys, Farhana Jahan PT @ Cybrosys,
Contacts

3
auto_database_backup/__init__.py

@ -19,5 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import controllers
from . import models
from . import wizard

17
auto_database_backup/__manifest__.py

@ -19,13 +19,14 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': "Automatic Database Backup",
'version': '14.0.1.0.0',
'summary': """Generate automatic backup of databases and store to local, google drive or remote server""",
'description': """This module has been developed for creating database backups automatically
and store it to the different locations.""",
'version': '14.0.1.0.1',
'summary': 'Generate automatic backup of databases and store to local, '
'google drive or remote server',
'description': 'his module has been developed for creating '
'database backups automatically '
'and store it to the different locations.',
'author': "Cybrosys Techno Solutions",
'website': "https://www.cybrosys.com",
'company': 'Cybrosys Techno Solutions',
@ -35,8 +36,12 @@
'data': [
'security/ir.model.access.csv',
'data/data.xml',
'views/db_backup_configure_views.xml'
'views/db_backup_configure_views.xml',
'wizard/dropbox_auth_code_views.xml'
],
'external_dependencies': {
'python': ['dropbox', 'pyncclient', 'boto3', 'nextcloud-api-wrapper',
'paramiko']},
'license': 'LGPL-3',
'images': ['static/description/banner.gif'],
'installable': True,

22
auto_database_backup/controllers/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from . import auto_database_backup

53
auto_database_backup/controllers/auto_database_backup.py

@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
import json
from odoo import http
from odoo.http import request
class OnedriveAuth(http.Controller):
"""Controller for handling authentication with OneDrive and Google Drive."""
@http.route('/onedrive/authentication', type='http', auth="public")
def oauth2callback(self, **kw):
"""
Callback function for OneDrive authentication.
:param kw: A dictionary of keyword arguments.
:return: A redirect response.
"""
state = json.loads(kw['state'])
backup_config = request.env['db.backup.configure'].sudo().browse(
state.get('backup_config_id'))
backup_config.get_onedrive_tokens(kw.get('code'))
backup_config.hide_active = True
backup_config.active = True
return http.local_redirect(state.get('url_return'))
@http.route('/google_drive/authentication', type='http', auth="public")
def gdrive_oauth2callback(self, **kw):
"""Callback function for Google Drive authentication."""
state = json.loads(kw['state'])
backup_config = request.env['db.backup.configure'].sudo().browse(
state.get('backup_config_id'))
backup_config.get_gdrive_tokens(kw.get('code'))
backup_config.active = True
return http.local_redirect(state.get('url_return'))

41
auto_database_backup/data/data.xml

@ -1,7 +1,5 @@
<?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">
@ -14,23 +12,28 @@
<field name="numbercall">-1</field>
<field name="active">True</field>
</record>
</data>
<data>
<!--Database backup operation Successful email template-->
<record id="mail_template_data_db_backup_successful" model="mail.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 | safe}</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 | safe}
</field>
<field name="body_html" type="xml">
<p style="margin: 0px;">
<span>Dear ${object.user_id.sudo().name},
</span>
<br/>
<br/>
<span style="margin-top: 8px;">Backup of the database <i>${object.db_name}</i> has been successfully
<span style="margin-top: 8px;">Backup of the database <i>
${object.db_name}
</i> has been successfully
generated and stored to
% if object.backup_destination in ('local'):
<i>Local</i>
@ -56,7 +59,8 @@
% elif object.backup_destination in ('sftp'):
<i>SFTP Server</i>
% endif
% if object.backup_destination in ('local', 'ftp', 'sftp')
% if object.backup_destination in ('local', 'ftp',
'sftp')
<br/>
Backup Path:
% if object.backup_destination in ('local'):
@ -75,20 +79,23 @@
</p>
</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 | safe}</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 | safe}
</field>
<field name="body_html" type="xml">
<p style="margin: 0px;">
<span>Dear ${object.user_id.sudo().name},
</span>
<br/>
<br/>
<span style="margin-top: 8px;">Backup generation of the database <i>${object.db_name}</i> has been
<span style="margin-top: 8px;">Backup generation of the
database <i>${object.db_name}</i> has been
Failed.
<br/>
<br/>
@ -104,7 +111,8 @@
% elif object.backup_destination in ('sftp'):
<i>SFTP Server</i>
% endif
% if object.backup_destination in ('local', 'ftp', 'sftp')
% if object.backup_destination in ('local', 'ftp',
'sftp')
<br/>
Backup Path:
% if object.backup_destination in ('local'):
@ -127,5 +135,4 @@
</field>
</record>
</data>
</odoo>

17
auto_database_backup/doc/RELEASE_NOTES.md

@ -5,5 +5,22 @@
#### ADD
- Initial commit for auto_database_backup
#### 16.02.2024
#### Version 14.0.1.0.1
#### ADD
- Dropbox integration added. Backup can be stored in to dropbox.
#### 16.02.2024
#### Version 14.0.1.0.1
#### ADD
- Onedrive integration added. Backup can be stored in to onedrive.
#### 16.02.2024
#### Version 14.0.1.0.1
#### ADD
- Google Drive authentication updated.
#### 16.02.2024
#### Version 14.0.1.0.1
#### ADD
- Nextcloud and Amazon S3 integration added. Backup can be stored into Nextcloud and Amazon S3.

9
auto_database_backup/models/__init__.py

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
#############################################################################
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
@ -17,5 +17,6 @@
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from . import db_backup_configure

932
auto_database_backup/models/db_backup_configure.py

File diff suppressed because it is too large

1
auto_database_backup/security/ir.model.access.csv

@ -1,2 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_db_backup_configure,access.db.backup.configure,model_db_backup_configure,base.group_user,1,1,1,1
access_dropbox_auth_code_user,access.dropbox.auth.code.user,model_dropbox_auth_code,base.group_user,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_db_backup_configure access.db.backup.configure model_db_backup_configure base.group_user 1 1 1 1
3 access_dropbox_auth_code_user access.dropbox.auth.code.user model_dropbox_auth_code base.group_user 1 1 1 1

BIN
auto_database_backup/static/description/assets/screenshots/add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazon_s3_7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazon_s3_8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazon_s3_pci1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazon_s3_pic 2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazons3-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazons3_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazons3_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazons3_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazons3_7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazons3_access.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazons3_pick 3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

BIN
auto_database_backup/static/description/assets/screenshots/amazons3_signup.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

BIN
auto_database_backup/static/description/assets/screenshots/backup7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 77 KiB

BIN
auto_database_backup/static/description/assets/screenshots/backup8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
auto_database_backup/static/description/assets/screenshots/backup9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 63 KiB

BIN
auto_database_backup/static/description/assets/screenshots/drive1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
auto_database_backup/static/description/assets/screenshots/drive2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
auto_database_backup/static/description/assets/screenshots/drive3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
auto_database_backup/static/description/assets/screenshots/drive4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
auto_database_backup/static/description/assets/screenshots/drive5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
auto_database_backup/static/description/assets/screenshots/drop1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
auto_database_backup/static/description/assets/screenshots/drop2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
auto_database_backup/static/description/assets/screenshots/drop3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
auto_database_backup/static/description/assets/screenshots/drop4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
auto_database_backup/static/description/assets/screenshots/dropbox-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
auto_database_backup/static/description/assets/screenshots/dropbox-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
auto_database_backup/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

BIN
auto_database_backup/static/description/assets/screenshots/hero.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

BIN
auto_database_backup/static/description/assets/screenshots/newcloud1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
auto_database_backup/static/description/assets/screenshots/newcloud2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

BIN
auto_database_backup/static/description/assets/screenshots/newcloud2_ds.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
auto_database_backup/static/description/assets/screenshots/next_cloud-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
auto_database_backup/static/description/assets/screenshots/next_cloud2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
auto_database_backup/static/description/assets/screenshots/next_cloud_9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
auto_database_backup/static/description/assets/screenshots/nextcloud_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

BIN
auto_database_backup/static/description/assets/screenshots/nextcloud_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

BIN
auto_database_backup/static/description/assets/screenshots/nextcloud_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
auto_database_backup/static/description/assets/screenshots/nextcloud_create_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

BIN
auto_database_backup/static/description/assets/screenshots/onedrive9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

644
auto_database_backup/static/description/index.html

@ -1,8 +1,11 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="container"
style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between" style="border-bottom: 1px solid #d5d5d5;">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between"
style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
<img src="./assets/icons/logo.png"
style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div
@ -28,14 +31,17 @@
Automatic Database Backup</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
A Module for generating database backup and storing backup to multiple locations.
A Module for generating database backup and storing backup to
multiple locations.
</p>
<img src="./assets/screenshots/hero.png" class="img-responsive" width="100%" height="auto" />
<img src="./assets/screenshots/hero.gif" class="img-responsive"
width="100%" height="auto"/>
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<div class="col-md-12"
style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
@ -54,7 +60,8 @@
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
<i class="fa fa-chevron-right"
style="color: #714B67 !important;"></i>
</div>
</div>
</a>
@ -72,7 +79,8 @@
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
<i class="fa fa-chevron-right"
style="color: #714B67 !important;"></i>
</div>
</div>
</a>
@ -90,7 +98,8 @@
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
<i class="fa fa-chevron-right"
style="color: #714B67 !important;"></i>
</div>
</div>
</a>
@ -99,7 +108,8 @@
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<div class="col-md-12"
style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
@ -109,18 +119,84 @@
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
This module helps to generate backups of your databases automatically on regular interval of times.
The generated backups can be stored into local storage, ftp server, sftp server or Google Drive.
User can enable auto remove option to automatically delete old backups.
User can enable email notification to be notified about the success and failure of the backup generation and storage.
Using Automatic Database Backup module user can generate and store database backups to multiple location.</p>
This module helps to generate backups of your databases
automatically on
regular interval of times. The generated backups can be stored
into
local storage, ftp server, sftp server, dropbox,nextcloud,
Google Drive
or Onedrive and Amazon S3. User can enable auto remove option to
automatically delete
old backups. User can enable email notification to be notified
about the
success and failure of the backup generation and storage.
Using Automatic Database Backup module user can generate and
store
database backups to multiple location.</p>
<div class="alert alert-primary mt-4">
<hr/>
This module uses an external python dependency 'dropbox'.Before
installing the module install the python
package
first.The required python package can be installed using the
following command,
<br/>
<code class="d-block mt-2">pip install dropbox</code>
</div>
<div class="alert alert-primary mt-4">
<hr/>
This module uses an external python dependency
'nextcloud'.Before
installing the module install the python
package
first.The required python package can be installed using the
following command,
<br/>
<code class="d-block mt-2">pip install pyncclient</code>
</div>
</div>
<div class="alert alert-primary mt-4">
<hr/>
This module uses an external python dependency
'nextcloud-api-wrapper'.Before
installing the module install the python
package
first.The required python package can be installed using the
following command,
<br/>
<code class="d-block mt-2">pip install nextcloud-api-wrapper</code>
</div>
<div class="alert alert-primary mt-4">
<hr/>
This module uses an external python dependency 'Boto3'.Before
installing
the module install the python
package
first.The required python package can be installed using the
following
command,
<br/>
<code class="d-block mt-2">pip install boto3</code>
</div>
<div class="alert alert-primary mt-4">
<hr/>
This module uses an external python dependency 'paramiko'.Before
installing the module install the python
package
first.The required python package can be installed using the
following
command,
<br/>
<code class="d-block mt-2">pip install paramiko</code>
</div>
</div>
</div>
<div class="row" id="features">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<div class="col-md-12"
style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
@ -196,6 +272,62 @@
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Store Backup to Dropbox</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Generated backup can be stored to Dropbox</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Store Backup to Onedrive</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Generated backup can be stored to Onedrive</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Store Backup to Nextcloud</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Generated backup can be stored to Nextcloud</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Store Backup to Amazon S3</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Generated backup can be stored to Amazon S3</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
@ -206,7 +338,8 @@
Automatically remove old backups.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Old backups files will be deleted automatically based on the obsolescence of backup.</p>
Old backups files will be deleted automatically based on the
obsolescence of backup.</p>
</div>
</div>
@ -220,14 +353,17 @@
Notify user on success and failure of backup generation</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
An email notification send to user on successful backup generation also send an email notification when backup operation failed.</p>
An email notification send to user on successful backup
generation also send an email notification when backup operation
failed.</p>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<div class="col-md-12"
style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
@ -239,8 +375,10 @@
Database Backup Configuration Menu</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Got Setting --> Technical --> Backup Configuration to configure backups</p>
<img src="assets/screenshots/backup1.png" class="img-responsive img-thumbnail border" width="100%"
Got Setting --> Technical --> Backup Configuration to configure
backups</p>
<img src="assets/screenshots/backup1.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
@ -250,10 +388,13 @@
Crate New Database Backup Configuration</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Enter the database name and master password. specify backup type and destination.
Enter the backup directory path, if directory does not exist new directory will be created.
Enter the database name and master password. specify backup type and
destination.
Enter the backup directory path, if directory does not exist new
directory will be created.
</p>
<img src="assets/screenshots/backup2.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup2.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
@ -264,23 +405,27 @@
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Select backup destination as SFTP, enter credentials.
Test connection button to check whether the connection is successful.
Test connection button to check whether the connection is
successful.
</p>
<img src="assets/screenshots/backup3.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup3.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
A successful message will be displayed if connection is successful
</p>
<img src="assets/screenshots/backup4.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup4.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
An error message will be displayed if test connection is failed
</p>
<img src="assets/screenshots/backup5.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup5.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
@ -292,45 +437,272 @@
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Select backup destination as FTP, enter credentials.
Test connection button to check whether the connection is successful.
Test connection button to check whether the connection is
successful.
</p>
<img src="assets/screenshots/backup6.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup6.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<div style="display: block; margin: 30px auto;">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Store Backup to Google Drive</h4>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
You'll need to create a
new
Google API project and enabling the Google Drive API, Go to the
<a href="https://console.developers.google.com/"
target="_blank">Google API Console</a> and log into your
account.
While creating the project, for the Redirect URI restrictions,
copy your Odoo database URI followed by
/google_drive/authentication. Example:</p>
<img src="assets/screenshots/drive1.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
ENABLE API AND SERVICES</p>
<img src="assets/screenshots/drive2.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
ENABLE GOOGLE DRIVE API</p>
<img src="assets/screenshots/drive3.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Create Credentials,
Follow
the steps, select Website application for the Application
Type.</p>
<img src="assets/screenshots/drive4.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Under the Authorized
JavaScript Origins section, click + Add URI and type your
company's Odoo URL address.
Under the Authorized redirect URIs section, click + Add URI and
type your company's Odoo URL address
followed
by <i>/google_drive/authentication</i>.
After all the steps are completed, A Client ID and Client secret
will
be given, copy the credentials
</p>
<img src="assets/screenshots/drive5.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Go to the "OAuth consent screen", then Test users and click on 'ADD
USERS' then add the user.
</p>
<img src="assets/screenshots/add.png" class="img-thumbnail">
</div>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Select backup destination as Google Drive. Enter google drive folder ID.
Enable and configure Google Drive option from general settings.
Configure Backup, Copy Client ID and Client Secret from Google Drive API
Credentials page into their respective fields.
</p>
<img src="assets/screenshots/backup7.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup7.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Setup refresh token from general settings
Setup Token, it will be redirected to an authorization page.
</p>
<img src="assets/screenshots/backup8.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup8.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Automatically Remove Old Backups</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Enable auto remove option, specify number of days to remove backups.
</p>
<img src="assets/screenshots/backup9.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup9.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Store Backup to Dropbox
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
To get the app key and secret key go to the <a
href="https://www.dropbox.com/developers/apps"
target="_blank">App
Console</a>.
Create a new app
</p>
<img src="assets/screenshots/drop2.png" class="img-thumbnail">
Once you created the App , you can get the App key and App Secret as seen in
the screenshot
<img src="assets/screenshots/drop3.png" class="img-thumbnail">
Choose your app's permission (files.content.write and files.content.read
permissions required).then click on Submit
<img src="assets/screenshots/drop4.png" class="img-thumbnail">
Choose Dropbox as that of the backup destination. Enter the app secret and
key and dropbox Folder.
<img src="assets/screenshots/dropbox-1.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Get the Authorization
Code
and click confirm.</p>
<img src="assets/screenshots/dropbox-2.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Store Backup to
Onedrive
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Select Backup
Destination
as OneDrive. Enter the App key and App secret.
you'll need to register a new app in the <a
href="https://portal.azure.com/" target="_blank">Microsoft
Azure
portal</a>.
While registering the app for the Redirect URI restrictions,
copy your Odoo database URI followed by
/onedrive/authentication. Example:</p>
<img src="assets/screenshots/onedrive1.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Copy the Client ID</p>
<img src="assets/screenshots/onedrive2.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Generate Client
Secret.</p>
<img src="assets/screenshots/onedrive3.png" class="img-thumbnail">
<img src="assets/screenshots/onedrive4.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Get OneDrive folder ID,
where need to store the backup files.</p>
<img src="assets/screenshots/onedrive5.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Configure the
Backup</p>
<img src="assets/screenshots/onedrive-1.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Setup Token, it will
be
redirected to an authorization page.</p>
<img src="assets/screenshots/onedrive8.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Store Backup to
Nextcloud
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
To Create an account in Nextcloud go to
https://nextcloud.com/sign-up/, Enter Your Email Address and
Sign up .
<img src="assets/screenshots/nextcloud_4.png"
class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
You will be redirected to the page as shown in the screenshot,
and it will ask you enter your email and password for the
Nextcloud.</p>
<img src="assets/screenshots/nextcloud_create_3.png"
class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
To get the Domain of the Nextcloud.Go to Settings in the
Nextcloud and Click on Mobile & desktop. You will see server
address Copy link and paste it in your Domain Name.</p>
<img src="assets/screenshots/next_cloud_9.png"
class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Select the backup destination as Nextcloud. Enter the Domain
Name, UserName, Password and Folder Name where you want to store
your backup on the NextCloud server. Check the Connect button
to check if the connection is successful.
<img src="assets/screenshots/next_cloud-1.png"
class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Every day, a Scheduled Action will take place to store a backup
on the Nextcloud Server. The backup will be stored as the folder
name provided in the Folder ID field in Odoo.
<img src="assets/screenshots/nextcloud_5.png"
class="img-thumbnail">
<img src="assets/screenshots/nextcloud_6.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Store Backup to
Amazon S3
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
To Create an account in Amazon S3 go to
https://portal.aws.amazon.com/billing/signup#/start/email, Enter
Your Email Address and Sign up .
<img src="assets/screenshots/amazons3_signup.png"
class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
After you created the account.You need to get the Access Key and
Secret Key,To get these go the account Security credentials and
go the Access Keys and create new access keys from there you
will get Access Key and Secret Key.</p>
<img src="assets/screenshots/amazon_s3_pci1.png"
class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"></p>
<img src="assets/screenshots/amazon_s3_pic 2.png"
class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"></p>
<img src="assets/screenshots/amazons3_access.png"
class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Next You need to create a Bucket Folder in the Amazon S3.To do
that Go the Services in the top right and go to Storage and S3
as shown in the Screen shot.</p>
<img src="assets/screenshots/amazons3_pick 3.png"
class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
To create Bucket folder,Click on the Create bucket Button.</p>
<img src="assets/screenshots/amazons3_4.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
On Creating a Bucket Folder,Check the rules for naming the
Bucket folder,and Select the region as well.After that click on
the create Bucket Button in the bottom of the page.</p>
<img src="assets/screenshots/amazons3_5.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
You will see the Bucket Folder as shown in the screenshot.</p>
<img src="assets/screenshots/amazons3_6.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Select Backup Destination as Amazon S3. Enter the Amazon S3
Access Key,Amazon S3 Secret Key,Bucket Name->Bucket folder you
have created in the Amazon S3 and the File Name->The Folder You
want to store your backup in Amazon S3 Bucket Folder.Test
connection button to check whether the connection is
successful.</p>
<img src="assets/screenshots/amazons3-1.png" class="img-thumbnail">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Every day, a Scheduled Action will take place to store a backup
on the Amazon S3 Server. The backup will be stored as the folder
name provided in the File Name field in Odoo.</p>
<img src="assets/screenshots/amazons3_7.png" class="img-thumbnail">
<img src="assets/screenshots/amazon_s3_8.png" class="img-thumbnail">
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
@ -338,9 +710,11 @@
Notify User on Success and Failure of Backup Generation</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Enable notify user option, and select a user to notify. An email notification will be sent to the selected user on
Enable notify user option, and select a user to notify. An email
notification will be sent to the selected user on
backup successful and failure.
<img src="assets/screenshots/backup10.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup10.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
@ -348,7 +722,8 @@
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Successful backup notification email</h4>
<img src="assets/screenshots/backup12.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup12.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
@ -356,7 +731,8 @@
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Notification email when backup generation failed</h4>
<img src="assets/screenshots/backup11.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup11.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
@ -368,17 +744,19 @@
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Enable the 'Automatic database Backup' scheduled action, and set up the execution interval.
Based on the scheduled action setup, backups will be generated on regular intervals.
Enable the 'Automatic database Backup' scheduled action, and set up the
execution interval.
Based on the scheduled action setup, backups will be generated on
regular intervals.
</p>
<img src="assets/screenshots/backup13.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup13.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
<img src="assets/screenshots/backup14.png" class="img-responsive img-thumbnail border" width="100%"
<img src="assets/screenshots/backup14.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
</div>
<!-- SUGGESTED PRODUCTS -->
<div class="row">
@ -392,8 +770,10 @@
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/export_stockinfo_xls/" target="_blank">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/export_stockinfo_xls/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
@ -401,8 +781,10 @@
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/dashboard_pos/" target="_blank">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/dashboard_pos/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
@ -410,8 +792,10 @@
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/product_approval_management/" target="_blank">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/product_approval_management/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
@ -421,8 +805,10 @@
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/base_account_budget/" target="_blank">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/base_account_budget/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
@ -430,8 +816,10 @@
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/shopify_odoo_connector/" target="_blank">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/shopify_odoo_connector/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
@ -439,8 +827,10 @@
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/odoo11_magento2/" target="_blank">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/odoo11_magento2/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
@ -451,11 +841,16 @@
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev" style="left:-25px;width: 35px;color: #000;">
<span class="carousel-control-prev-icon"><i class="fa fa-chevron-left" style="font-size:24px"></i></span>
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;width: 35px;color: #000;">
<span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left"
style="font-size:24px"></i></span>
</a>
<a class="carousel-control-next" href="#demo1" data-slide="next" style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right" style="font-size:24px"></i></span>
<a class="carousel-control-next" href="#demo1" data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i
class="fa fa-chevron-right" style="font-size:24px"></i></span>
</a>
</div>
</div>
@ -474,9 +869,11 @@
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/cogs.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
@ -484,9 +881,11 @@
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/wrench.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
@ -494,9 +893,11 @@
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/lifebuoy.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
@ -505,9 +906,11 @@
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/user.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
@ -516,9 +919,11 @@
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/puzzle.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
@ -526,9 +931,11 @@
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/update.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
@ -537,9 +944,11 @@
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/consultation.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
@ -547,9 +956,11 @@
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/training.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
@ -557,15 +968,17 @@
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/license.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
@ -579,7 +992,8 @@
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="./assets/icons/trading-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
@ -593,7 +1007,8 @@
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="./assets/icons/pos-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
@ -607,7 +1022,8 @@
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/education-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="./assets/icons/education-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
@ -620,7 +1036,8 @@
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="./assets/icons/manufacturing-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
@ -633,7 +1050,8 @@
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="./assets/icons/ecom-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
@ -647,7 +1065,8 @@
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="./assets/icons/service-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
@ -660,7 +1079,8 @@
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="./assets/icons/restaurant-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
@ -673,7 +1093,8 @@
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="./assets/icons/hotel-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
@ -687,7 +1108,7 @@
</div>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
@ -704,16 +1125,19 @@
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="col-lg-12"
style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
<a href="mailto:odoo@cybrosys.com" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
<a href="https://api.whatsapp.com/send?phone=918606827707"
target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>+91 86068 27707</a>
@ -726,10 +1150,13 @@
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<div class="row"
style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
<div class="col-lg-12 d-flex justify-content-center align-items-center"
style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px"
height="auto"/>
</div>
<!-- End of Logo -->
<div class="col-lg-12">
@ -741,4 +1168,3 @@
</section>
<!-- END OF FOOTER -->
</div>

178
auto_database_backup/views/db_backup_configure_views.xml

@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--Database backup configuration views-->
<record id="view_db_backup_configure_list" model="ir.ui.view">
<field name="name">db.backup.configure.list</field>
<field name="model">db.backup.configure</field>
@ -16,13 +13,14 @@
</tree>
</field>
</record>
<record id="view_db_backup_configure_form" model="ir.ui.view">
<field name="name">db.backup.configure.form</field>
<field name="model">db.backup.configure</field>
<field name="arch" type="xml">
<form>
<sheet>
<field name="gdrive_backup_error_test" invisible="1"/>
<field name="onedrive_backup_error_test" invisible="1"/>
<div class="oe_title">
<h1>
<field name="name" placeholder="Name..."/>
@ -37,10 +35,6 @@
</group>
<group>
<field name="backup_destination" required="1"/>
<div class="text-muted"
attrs="{'invisible': [('backup_destination', '!=', 'google_drive')]}">Enable and
configure Google Drive option from General Settings
</div>
<field name="backup_path"
attrs="{'invisible': [('backup_destination', '!=', 'local')], 'required': [('backup_destination', '=', 'local')]}"/>
<field name="ftp_host"
@ -65,8 +59,69 @@
password="True"/>
<field name="sftp_path"
attrs="{'invisible': [('backup_destination', '!=', 'sftp')], 'required': [('backup_destination', '=', 'sftp')]}"/>
<field name="google_drive_folderid"
<field name="gdrive_client_key" string="Client ID"
attrs="{'invisible': [('backup_destination', '!=', 'google_drive')], 'required': [('backup_destination', '=', 'google_drive')]}"/>
<field name="gdrive_client_secret"
string="Client Secret"
attrs="{'invisible': [('backup_destination', '!=', 'google_drive')], 'required': [('backup_destination', '=', 'google_drive')]}"
password="True"/>
<field name="gdrive_redirect_uri"
string="Redirect URI"
attrs="{'invisible': [('backup_destination', '!=', 'google_drive')]}"/>
<field name="gdrive_access_token" password="True"
invisible="1"/>
<field name="gdrive_refresh_token" password="True"
invisible="1"/>
<field name="gdrive_token_validity" invisible="1"/>
<field name="google_drive_folder"
attrs="{'invisible': [('backup_destination', '!=', 'google_drive')], 'required': [('backup_destination', '=', 'google_drive')]}"/>
<field name="is_google_drive_token_generated"
invisible="1"/>
<field name="onedrive_client_key" string="Client ID"
attrs="{'invisible': [('backup_destination', '!=', 'onedrive')], 'required': [('backup_destination', '=', 'onedrive')]}"/>
<field name="onedrive_client_secret"
string="Client Secret"
attrs="{'invisible': [('backup_destination', '!=', 'onedrive')], 'required': [('backup_destination', '=', 'onedrive')]}"
password="True"/>
<field name="onedrive_redirect_uri"
string="Redirect URI"
attrs="{'invisible': [('backup_destination', '!=', 'onedrive')]}"/>
<field name="onedrive_folder_key" string="Folder ID"
attrs="{'invisible': [('backup_destination', '!=', 'onedrive')], 'required': [('backup_destination', '=', 'onedrive')]}"/>
<field name="onedrive_access_token"
string="Access Token"
invisible="1" password="True"/>
<field name="onedrive_refresh_token"
string="Refresh Token" invisible="1"
password="True"/>
<field name="onedrive_token_validity"
string="Token Validity" invisible="1"/>
<field name="is_onedrive_token_generated"
invisible="1"/>
<field name="dropbox_client_key" string="App Key"
attrs="{'invisible': [('backup_destination', '!=', 'dropbox')], 'required': [('backup_destination', '=', 'dropbox')]}"
password="True"/>
<field name="dropbox_client_secret"
string="App Secret"
attrs="{'invisible': [('backup_destination', '!=', 'dropbox')], 'required': [('backup_destination', '=', 'dropbox')]}"
password="True"/>
<field name="domain" string="Domain Name"
attrs="{'invisible': [('backup_destination', '!=', 'next_cloud')]}"/>
<field name="next_cloud_user_name"
string="User Name"
attrs="{'invisible': [('backup_destination', '!=', 'next_cloud')]}"/>
<field name="next_cloud_password" string="Password"
attrs="{'invisible': [('backup_destination', '!=', 'next_cloud')]}"/>
<field name="nextcloud_folder_key" string="Folder ID"
attrs="{'invisible': [('backup_destination', '!=', 'next_cloud')]}"/>
<field name="aws_access_key"
attrs="{'invisible': [('backup_destination', '!=', 'amazon_s3')]}"/>
<field name="aws_secret_access_key"
attrs="{'invisible': [('backup_destination', '!=', 'amazon_s3')]}"/>
<field name="bucket_file_name"
attrs="{'invisible': [('backup_destination', '!=', 'amazon_s3')]}"/>
<field name="aws_folder_name"
attrs="{'invisible': [('backup_destination', '!=', 'amazon_s3')]}"/>
<field name="auto_remove"/>
<label for="days_to_remove" class="oe_inline"
attrs="{'invisible': [('auto_remove', '=', False)]}"/>
@ -75,8 +130,110 @@
attrs="{'required': [('auto_remove', '=', True)]}"/>
Days
</div>
<div attrs="{'invisible': [('backup_destination', '!=', 'google_drive')]}">
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'google_drive'), ('is_google_drive_token_generated', '=', False)]}">
<i class="text-success fa fa-check"/>
Refresh token set
</div>
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'google_drive'), ('is_google_drive_token_generated', '=', True)]}">
<i class="fa fa-exclamation-triangle text-warning"/>
No refresh token set
</div>
</div>
<div attrs="{'invisible': [('backup_destination', '!=', 'google_drive')]}">
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'google_drive'), ('is_google_drive_token_generated', '=', True)]}">
<button class="btn btn-link"
name="action_get_gdrive_auth_code"
type="object">
<i class="fa fa-arrow-right"/>
Setup Token
</button>
</div>
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'google_drive'), ('is_google_drive_token_generated', '=', False)]}">
<button class="btn btn-link"
name="action_get_gdrive_auth_code"
type="object">
<i class="fa fa-arrow-right"/>
Reset Token
</button>
</div>
</div>
<div class="alert alert-danger" role="alert" style="margin-bottom:0px;width: 229%;" attrs="{'invisible': [('gdrive_backup_error_test', '=', False)]}">
Something went wrong during your token generation. Maybe your Authorization Code is invalid
</div>
<div attrs="{'invisible': [('backup_destination', '!=', 'dropbox')]}">
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'dropbox'), ('is_dropbox_token_generated', '=', False)]}">
<i class="text-success fa fa-check"/>
Refresh token set
</div>
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'dropbox'), ('is_dropbox_token_generated', '=', True)]}">
<i class="fa fa-exclamation-triangle text-warning"/>
No refresh token set
</div>
</div>
<div attrs="{'invisible': [('backup_destination', '!=', 'dropbox')]}">
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'dropbox'), ('is_dropbox_token_generated', '=', True)]}">
<button class="btn btn-link"
name="action_get_dropbox_auth_code"
type="object">
<i class="fa fa-arrow-right"/>
Setup Token
</button>
</div>
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'dropbox'), ('is_dropbox_token_generated', '=', False)]}">
<button class="btn btn-link"
name="action_get_dropbox_auth_code"
type="object">
<i class="fa fa-arrow-right"/>
Reset Token
</button>
</div>
</div>
<div attrs="{'invisible': [('backup_destination', '!=', 'onedrive')]}">
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'onedrive'), ('is_onedrive_token_generated', '=', False)]}">
<i class="text-success fa fa-check"/>
Refresh token set
</div>
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'onedrive'), ('is_onedrive_token_generated', '=', True)]}">
<i class="fa fa-exclamation-triangle text-warning"/>
No refresh token set
</div>
</div>
<div attrs="{'invisible': [('backup_destination', '!=', 'onedrive')]}">
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'onedrive'), ('is_onedrive_token_generated', '=', True)]}">
<button class="btn btn-link"
name="action_get_onedrive_auth_code"
type="object">
<i class="fa fa-arrow-right"/>
Setup Token
</button>
</div>
<div attrs="{'invisible': ['|', ('backup_destination', '!=', 'onedrive'), ('is_onedrive_token_generated', '=', False)]}">
<button class="btn btn-link"
name="action_get_onedrive_auth_code"
type="object">
<i class="fa fa-arrow-right"/>
Reset Token
</button>
</div>
</div>
<div class="alert alert-danger" role="alert" style="margin-bottom:0px;width: 91%%;" attrs="{'invisible': [('onedrive_backup_error_test', '=', False)]}">
Bad microsoft onedrive request. Maybe your Authorization Code is invalid
</div>
<field name="dropbox_refresh_token" invisible="1"/>
<field name="is_dropbox_token_generated" invisible="1"/>
<field name="dropbox_folder"
attrs="{'invisible': [('backup_destination', '!=', 'dropbox')], 'required': [('backup_destination', '=', 'dropbox')]}"/>
<button name="test_connection" type="object" string="Test Connection" icon="fa-television"
attrs="{'invisible': [('backup_destination', 'not in', ('ftp', 'sftp'))]}"/>
<button name="action_nextcloud" type="object"
string="Test Connection"
icon="fa-television"
attrs="{'invisible': [('backup_destination', '!=', 'next_cloud')]}"/>
<button name="action_s3cloud" type="object"
string="Test Connection"
icon="fa-television"
attrs="{'invisible': [('backup_destination', '!=', 'amazon_s3')]}"/>
</group>
<group>
<field name="notify_user"/>
@ -87,7 +244,6 @@
</form>
</field>
</record>
<record id="view_db_backup_configure_search" model="ir.ui.view">
<field name="name">db.backup.configure.search</field>
<field name="model">db.backup.configure</field>
@ -105,7 +261,6 @@
</search>
</field>
</record>
<record id="action_db_backup_configure" model="ir.actions.act_window">
<field name="name">Database Backup</field>
<field name="res_model">db.backup.configure</field>
@ -117,7 +272,6 @@
</field>
<field name="context">{'search_default_all': 1}</field>
</record>
<menuitem id="menu_db_backup" name="Automatic Database Backup" parent="base.menu_custom" sequence="10"/>
<menuitem id="menu_db_backup_configuration" parent="menu_db_backup" name="Backup Configuration"
action="action_db_backup_configure"/>

22
auto_database_backup/wizard/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from . import dropbox_auth_code

59
auto_database_backup/wizard/dropbox_auth_code.py

@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from odoo import api, fields, models
GOOGLE_AUTH_ENDPOINT = 'https://accounts.google.com/o/oauth2/auth'
GOOGLE_TOKEN_ENDPOINT = 'https://accounts.google.com/o/oauth2/token'
class AuthenticationWizard(models.TransientModel):
"""Wizard to handle authentication for backup configuration.
This wizard allows users to enter the Dropbox authorization code and
sets up the Dropbox refresh token."""
_name = 'dropbox.auth.code'
_description = 'Authentication Code Wizard'
dropbox_authorization_code = fields.Char(
string='Dropbox Authorization Code',
help='The authorization code of dropbox')
dropbox_auth_url = fields.Char(string='Dropbox Authentication URL',
compute='_compute_dropbox_auth_url',
help='Dropbox authentication URL')
@api.depends('dropbox_authorization_code')
def _compute_dropbox_auth_url(self):
"""Compute method to generate the Dropbox authentication URL based on
the provided authorization code."""
backup_config = self.env['db.backup.configure'].browse(
self.env.context.get('active_id'))
dropbox_auth_url = backup_config.get_dropbox_auth_url()
for rec in self:
rec.dropbox_auth_url = dropbox_auth_url
def action_setup_dropbox_token(self):
"""Action method to set up the Dropbox refresh token using the
provided authorization code."""
backup_config = self.env['db.backup.configure'].browse(
self.env.context.get('active_id'))
backup_config.hide_active = True
backup_config.active = True
backup_config.set_dropbox_refresh_token(self.dropbox_authorization_code)

35
auto_database_backup/wizard/dropbox_auth_code_views.xml

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--Form view of authentication.wizard-->
<record id="dropbox_auth_code_view_form" model="ir.ui.view">
<field name="name">dropbox.auth.code.view.form</field>
<field name="model">dropbox.auth.code</field>
<field name="arch" type="xml">
<form>
<group invisible="not context.get('dropbox_auth')">
<span>Get an authorization code and set it in the field
below.
</span>
<field name="dropbox_auth_url"
class="fa fa-arrow-right"
widget="url"
text="Get Authorization Code"
nolabel="1"/>
</group>
<group>
<field name="dropbox_authorization_code"
required="context.get('dropbox_auth')"
invisible="not context.get('dropbox_auth')"/>
</group>
<footer>
<button string="Confirm" type="object"
name="action_setup_dropbox_token"
class="btn-primary"
invisible="not context.get('dropbox_auth')"/>
<button string="Cancel" class="btn-secondary"
special="cancel"/>
</footer>
</form>
</field>
</record>
</odoo>

BIN
customize_settings.zip

Binary file not shown.
Loading…
Cancel
Save