From 72121cc6b49c24a258b7f5c47b7482ee9f2b7bf3 Mon Sep 17 00:00:00 2001
From: rpinset <12782314+rpinset@users.noreply.github.com>
Date: Fri, 28 Jun 2024 10:06:42 +0200
Subject: [PATCH] [MIG] auto_backup: Migration to 17.0
---
auto_backup/README.rst | 5 +-
auto_backup/__manifest__.py | 2 +-
auto_backup/models/db_backup.py | 7 +-
auto_backup/readme/ROADMAP.md | 4 +-
auto_backup/static/description/index.html | 3 +-
auto_backup/tests/test_db_backup.py | 22 +++---
auto_backup/view/db_backup_view.xml | 89 ++++++++++++-----------
7 files changed, 68 insertions(+), 64 deletions(-)
diff --git a/auto_backup/README.rst b/auto_backup/README.rst
index 1d54f9efe..f02f62bf7 100644
--- a/auto_backup/README.rst
+++ b/auto_backup/README.rst
@@ -107,8 +107,9 @@ Known issues / Roadmap
- On larger databases, it is possible that backups will die due to Odoo
server settings. In order to circumvent this without frivolously
changing settings, you need to run the backup from outside of the main
- Odoo instance. How to do this is outlined in `this blog
- post `__.
+ Odoo instance. How to do this (for version 9.0) was outlined in `this
+ blog
+ post `__.
- Backups won't work if list_db=False is configured in the instance.
Bug Tracker
diff --git a/auto_backup/__manifest__.py b/auto_backup/__manifest__.py
index 8c731aa7f..8bcb2d5cc 100644
--- a/auto_backup/__manifest__.py
+++ b/auto_backup/__manifest__.py
@@ -6,7 +6,7 @@
{
"name": "Database Auto-Backup",
"summary": "Backups database",
- "version": "16.0.1.0.0",
+ "version": "17.0.1.0.0",
"author": "Yenthe Van Ginneken, "
"Agile Business Group, "
"Grupo ESOC Ingenieria de Servicios, "
diff --git a/auto_backup/models/db_backup.py b/auto_backup/models/db_backup.py
index 18b7857a0..13e7bdc56 100644
--- a/auto_backup/models/db_backup.py
+++ b/auto_backup/models/db_backup.py
@@ -216,8 +216,7 @@ class DbBackup(models.Model):
_logger.exception("Database backup failed: %s", self.name)
escaped_tb = tools.html_escape(traceback.format_exc())
self.message_post( # pylint: disable=translation-required
- body="
",
subtype_id=self.env.ref("auto_backup.mail_message_subtype_failure").id,
)
else:
@@ -264,8 +263,8 @@ class DbBackup(models.Model):
_logger.exception("Cleanup of old database backups failed: %s")
escaped_tb = tools.html_escape(traceback.format_exc())
self.message_post( # pylint: disable=translation-required
- body="
%s
%s
"
- % (_("Cleanup of old database backups failed."), escaped_tb),
+ body=f"
{_('Cleanup of old database backups failed.')}
"
+ f"
{escaped_tb}
",
subtype_id=self.env.ref("auto_backup.failure").id,
)
else:
diff --git a/auto_backup/readme/ROADMAP.md b/auto_backup/readme/ROADMAP.md
index 93e7ad754..10304e758 100644
--- a/auto_backup/readme/ROADMAP.md
+++ b/auto_backup/readme/ROADMAP.md
@@ -1,6 +1,6 @@
- On larger databases, it is possible that backups will die due to Odoo
server settings. In order to circumvent this without frivolously
changing settings, you need to run the backup from outside of the main
- Odoo instance. How to do this is outlined in [this blog
- post](https://blog.laslabs.com/2016/10/running-python-scripts-within-odoos-environment/).
+ Odoo instance. How to do this (for version 9.0) was outlined in [this blog
+ post](https://web.archive.org/web/20240805225230/https://blog.laslabs.com/2016/10/running-python-scripts-within-odoos-environment/).
- Backups won't work if list_db=False is configured in the instance.
diff --git a/auto_backup/static/description/index.html b/auto_backup/static/description/index.html
index bf9d72b1c..f69c95f71 100644
--- a/auto_backup/static/description/index.html
+++ b/auto_backup/static/description/index.html
@@ -462,7 +462,8 @@ manually execute the selected processes.