Skip to content

Commit

Permalink
[MIG] auto_backup: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
michelerusti committed Jan 17, 2025
1 parent 7d70855 commit 91e3a81
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion auto_backup/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "Database Auto-Backup",
"summary": "Backups database",
"version": "16.0.1.0.1",
"version": "18.0.1.0.0",
"author": "Yenthe Van Ginneken, "
"Agile Business Group, "
"Grupo ESOC Ingenieria de Servicios, "
Expand Down
1 change: 0 additions & 1 deletion auto_backup/data/ir_cron.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field
name="nextcall"
eval="(datetime.now() + timedelta(days=1)).strftime('%Y-%m-%d 03:00:00')"
Expand Down
6 changes: 3 additions & 3 deletions auto_backup/models/db_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _check_folder(self):
tools.config.filestore(self.env.cr.dbname)
):
raise exceptions.ValidationError(
_(
self.env.self.env._(
"Do not save backups on your filestore, or you will "
"backup your backups too!"
)
Expand All @@ -129,14 +129,14 @@ def action_sftp_test_connection(self):
try:
# Just open and close the connection
with self.sftp_connection():
raise UserError(_("Connection Test Succeeded!"))
raise UserError(self.env._("Connection Test Succeeded!"))
except (
pysftp.CredentialException,
pysftp.ConnectionException,
pysftp.SSHException,
) as exc:
_logger.info("Connection Test Failed!", exc_info=True)
raise UserError(_("Connection Test Failed!")) from exc
raise UserError(self.env._("Connection Test Failed!")) from exc

def action_backup(self):
"""Run selected backups."""
Expand Down
6 changes: 3 additions & 3 deletions auto_backup/view/db_backup_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<field name="method" />
<field name="backup_format" />
</group>
<div attrs="{'invisible': [('method', '!=', 'sftp')]}">
<div invisible="method != 'sftp'">
<div class="bg-warning">
<h3>Warning:</h3>
Use SFTP with caution! This writes files to external servers under the path you specify.
Expand Down Expand Up @@ -62,11 +62,11 @@
<record id="view_backup_conf_tree" model="ir.ui.view">
<field name="model">db.backup</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="name" />
<field name="folder" />
<field name="days_to_keep" />
</tree>
</list>
</field>
</record>
<record id="view_backup_conf_search" model="ir.ui.view">
Expand Down

0 comments on commit 91e3a81

Please sign in to comment.