Browse Source

FIX auto_backup: avoid overwrinting of configuration at module update

(already fixed in 9.0 and 10.0)
pull/751/head
eLBati 8 years ago
parent
commit
9d646611a9
  1. 5
      auto_backup/__openerp__.py
  2. 28
      auto_backup/data/backup_data.yml
  3. 20
      auto_backup/data/ir_cron.xml
  4. 21
      auto_backup/data/mail_message_subtype.xml

5
auto_backup/__openerp__.py

@ -7,7 +7,7 @@
{ {
"name": "Database Auto-Backup", "name": "Database Auto-Backup",
"summary": "Backups database", "summary": "Backups database",
"version": "8.0.1.0.1",
"version": "8.0.1.0.2",
"author": ( "author": (
"VanRoey.be - Yenthe Van Ginneken, Agile Business Group," "VanRoey.be - Yenthe Van Ginneken, Agile Business Group,"
" Grupo ESOC Ingeniería de Servicios," " Grupo ESOC Ingeniería de Servicios,"
@ -19,7 +19,8 @@
"depends": ['email_template'], "depends": ['email_template'],
"demo": [], "demo": [],
"data": [ "data": [
"data/backup_data.yml",
"data/ir_cron.xml",
"data/mail_message_subtype.xml",
"security/ir.model.access.csv", "security/ir.model.access.csv",
"view/db_backup_view.xml", "view/db_backup_view.xml",
], ],

28
auto_backup/data/backup_data.yml

@ -1,28 +0,0 @@
# -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Cron job
- !record {model: ir.cron, id: ir_cron_backupscheduler0}:
name: Backup scheduler
user_id: base.user_root
interval_number: 1
interval_type: days
numbercall: -1
nextcall: !eval
(datetime.now() + timedelta(days=1)).strftime("%Y-%m-%d 02:00:00")
model: db.backup
function: action_backup_all
# New message subtypes
- !record {model: mail.message.subtype, id: success}:
name: Backup successful
res_model: db.backup
default: False
description: Database backup succeeded.
- !record {model: mail.message.subtype, id: failure}:
name: Backup failed
res_model: db.backup
default: True
description: Database backup failed.

20
auto_backup/data/ir_cron.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data noupdate="1">
<record id="ir_cron_backup_scheduler_0" model="ir.cron">
<field name="name">Backup Scheduler</field>
<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 02:00:00')"
/>
<field name="model">db.backup</field>
<field name="function">action_backup_all</field>
</record>
</data>
</openerp>

21
auto_backup/data/mail_message_subtype.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data noupdate="1">
<record id="mail_message_subtype_success" model="mail.message.subtype">
<field name="name">Backup Successful</field>
<field name="description">Database backup succeeded.</field>
<field name="res_model">db.backup</field>
<field name="default" eval="False" />
</record>
<record id="mail_message_subtype_failure" model="mail.message.subtype">
<field name="name">Backup Failed</field>
<field name="description">Database backup failed.</field>
<field name="res_model">db.backup</field>
<field name="default" eval="True" />
</record>
</data>
</openerp>
Loading…
Cancel
Save