diff --git a/odoo_backup_sh/README.rst b/odoo_backup_sh/README.rst index 5501965cb5..958ebb7a0d 100644 --- a/odoo_backup_sh/README.rst +++ b/odoo_backup_sh/README.rst @@ -212,4 +212,4 @@ Further information Odoo Apps Store: https://apps.odoo.com/apps/modules/13.0/odoo_backup_sh/ -Tested on `Odoo 12.0 `_ +Tested on `Odoo 13.0 `_ diff --git a/odoo_backup_sh/models/odoo_backup_sh.py b/odoo_backup_sh/models/odoo_backup_sh.py index c7970f76df..6d5bffd6d9 100644 --- a/odoo_backup_sh/models/odoo_backup_sh.py +++ b/odoo_backup_sh/models/odoo_backup_sh.py @@ -91,6 +91,8 @@ class BackupConfig(models.Model): @api.model def _compute_database_names(self): + # Uncomment the following line if you want to control all the databases while keeping /web/database/manager page hidden + # return [(db, db) for db in odoo.service.db.list_dbs(force=True)] if odoo.tools.config["list_db"]: return [ (db, db) for db in odoo.service.db.list_dbs() if db != "session_store" @@ -631,8 +633,11 @@ def get_dump_stream_and_info_file(self, name, service, ts): if config_record.backup_simulation: dump_stream = tempfile.TemporaryFile() else: + # Comment following line and uncomment next few lines if you want control all the databases, while keeping /web/database/manager page hidden dump_stream = odoo.service.db.dump_db(name, None, "zip") - + # from unittest.mock import patch + # with patch.dict(odoo.tools.config.options, {'list_db': True}): + # dump_stream = odoo.service.db.dump_db(name, None, "zip") if config_record.encrypt_backups and config_record.backup_simulation is False: # GnuPG ignores the --output parameter with an existing file object as value backup_encrpyted = tempfile.NamedTemporaryFile()