diff --git a/auto_backup/README.rst b/auto_backup/README.rst index 2850e7767..1acb6e225 100644 --- a/auto_backup/README.rst +++ b/auto_backup/README.rst @@ -14,13 +14,13 @@ Database Auto-Backup :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github - :target: https://github.com/OCA/server-tools/tree/12.0/auto_backup + :target: https://github.com/OCA/server-tools/tree/14.0/auto_backup :alt: OCA/server-tools .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-auto_backup + :target: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-auto_backup :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/12.0 + :target: https://runbot.odoo-community.org/runbot/149/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -39,7 +39,6 @@ Before installing this module, you need to execute:: pip3 install pysftp==0.2.8 - Configuration ============= @@ -113,7 +112,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -138,6 +137,7 @@ Contributors * Dave Lasley * Andrea Stirpe * Aitor Bouzas +* Simone Vanin Maintainers ~~~~~~~~~~~ @@ -152,6 +152,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/server-tools `_ project on GitHub. +This module is part of the `OCA/server-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/auto_backup/__manifest__.py b/auto_backup/__manifest__.py index 5d3c73b18..587cc1ce5 100644 --- a/auto_backup/__manifest__.py +++ b/auto_backup/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Database Auto-Backup", "summary": "Backups database", - "version": "13.0.1.0.0", + "version": "14.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 01b4fc4f8..cb7b517d3 100644 --- a/auto_backup/models/db_backup.py +++ b/auto_backup/models/db_backup.py @@ -12,6 +12,7 @@ from datetime import datetime, timedelta from glob import iglob from odoo import _, api, exceptions, fields, models, tools +from odoo.exceptions import UserError from odoo.service import db _logger = logging.getLogger(__name__) @@ -133,14 +134,14 @@ class DbBackup(models.Model): try: # Just open and close the connection with self.sftp_connection(): - raise exceptions.Warning(_("Connection Test Succeeded!")) + raise UserError(_("Connection Test Succeeded!")) except ( pysftp.CredentialException, pysftp.ConnectionException, pysftp.SSHException, ): _logger.info("Connection Test Failed!", exc_info=True) - raise exceptions.Warning(_("Connection Test Failed!")) + raise UserError(_("Connection Test Failed!")) def action_backup(self): """Run selected backups.""" @@ -216,7 +217,7 @@ class DbBackup(models.Model): self.message_post( # pylint: disable=translation-required body="

%s

%s
" % (_("Database backup failed."), escaped_tb), - subtype=self.env.ref("auto_backup.mail_message_subtype_failure"), + subtype_id=self.env.ref("auto_backup.mail_message_subtype_failure").id, ) else: _logger.info("Database backup succeeded: %s", self.name) @@ -264,7 +265,7 @@ class DbBackup(models.Model): self.message_post( # pylint: disable=translation-required body="

%s

%s
" % (_("Cleanup of old database backups failed."), escaped_tb), - subtype=self.env.ref("auto_backup.failure"), + subtype_id=self.env.ref("auto_backup.failure").id, ) else: _logger.info("Cleanup of old database backups succeeded: %s", self.name) diff --git a/auto_backup/readme/CONTRIBUTORS.rst b/auto_backup/readme/CONTRIBUTORS.rst index 7ee6bb99e..552ecb558 100644 --- a/auto_backup/readme/CONTRIBUTORS.rst +++ b/auto_backup/readme/CONTRIBUTORS.rst @@ -4,3 +4,4 @@ * Dave Lasley * Andrea Stirpe * Aitor Bouzas +* Simone Vanin diff --git a/auto_backup/static/description/index.html b/auto_backup/static/description/index.html index 0d4346de3..17cec612f 100644 --- a/auto_backup/static/description/index.html +++ b/auto_backup/static/description/index.html @@ -3,7 +3,7 @@ - + Database Auto-Backup