Browse Source

May 20 [UPDT] : Updated 'auto_database_backup'

pull/317/head
AjmalCybro 1 year ago
parent
commit
4f44ae8c3d
  1. 2
      auto_database_backup/__manifest__.py
  2. 8
      auto_database_backup/doc/RELEASE_NOTES.md
  3. 10
      auto_database_backup/models/db_backup_configure.py

2
auto_database_backup/__manifest__.py

@ -22,7 +22,7 @@
{ {
'name': "Automatic Database Backup To Local Server, Remote Server," 'name': "Automatic Database Backup To Local Server, Remote Server,"
"Google Drive, Dropbox, Onedrive, Nextcloud and Amazon S3 Odoo17", "Google Drive, Dropbox, Onedrive, Nextcloud and Amazon S3 Odoo17",
'version': '17.0.3.0.1', 'version': '17.0.4.0.1',
'live_test_url': 'https://youtu.be/Q2yMZyYjuTI', 'live_test_url': 'https://youtu.be/Q2yMZyYjuTI',
'category': 'Extra Tools', 'category': 'Extra Tools',
'summary': 'Odoo Database Backup, Automatic Backup, Database Backup, Automatic Backup,Database auto-backup, odoo backup' 'summary': 'Odoo Database Backup, Automatic Backup, Database Backup, Automatic Backup,Database auto-backup, odoo backup'

8
auto_database_backup/doc/RELEASE_NOTES.md

@ -21,3 +21,11 @@
#### UPDT #### UPDT
- Fixed the errors while inputting list_db = False in odoo conf file. - Fixed the errors while inputting list_db = False in odoo conf file.
## Module <auto_database_backup>
#### 21.05.2024
#### Version 17.0.4.0.1
#### UPDT
- Changed response.list_buckets() function to head_bucket().

10
auto_database_backup/models/db_backup_configure.py

@ -208,13 +208,13 @@ class DbBackupConfigure(models.Model):
operations for connection test""" operations for connection test"""
if self.aws_access_key and self.aws_secret_access_key: if self.aws_access_key and self.aws_secret_access_key:
try: try:
bo3 = boto3.client( s3_client = boto3.client(
's3', 's3',
aws_access_key_id=self.aws_access_key, aws_access_key_id=self.aws_access_key,
aws_secret_access_key=self.aws_secret_access_key) aws_secret_access_key=self.aws_secret_access_key
response = bo3.list_buckets() )
for bucket in response['Buckets']: response = s3_client.head_bucket(Bucket=self.bucket_file_name)
if self.bucket_file_name == bucket['Name']: if response['ResponseMetadata']['HTTPStatusCode'] == 200:
self.active = True self.active = True
self.hide_active = True self.hide_active = True
return { return {

Loading…
Cancel
Save