From 07d4b900e7a96677dd9c8c8114399760047e1045 Mon Sep 17 00:00:00 2001 From: cubells Date: Wed, 17 May 2017 12:56:19 +0200 Subject: [PATCH] [MIG][9.0] gamification_sale_crm: add migration scripts --- .../migrations/9.0.1.0/noupdate_changes.xml | 15 +++++++++++++++ .../9.0.1.0/openupgrade_analysis_work.txt | 4 ++++ .../migrations/9.0.1.0/post-migration.py | 16 ++++++++++++++++ openerp/openupgrade/doc/source/modules80-90.rst | 2 +- 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 addons/gamification_sale_crm/migrations/9.0.1.0/noupdate_changes.xml create mode 100644 addons/gamification_sale_crm/migrations/9.0.1.0/openupgrade_analysis_work.txt create mode 100644 addons/gamification_sale_crm/migrations/9.0.1.0/post-migration.py diff --git a/addons/gamification_sale_crm/migrations/9.0.1.0/noupdate_changes.xml b/addons/gamification_sale_crm/migrations/9.0.1.0/noupdate_changes.xml new file mode 100644 index 000000000000..c555030a8f62 --- /dev/null +++ b/addons/gamification_sale_crm/migrations/9.0.1.0/noupdate_changes.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/addons/gamification_sale_crm/migrations/9.0.1.0/openupgrade_analysis_work.txt b/addons/gamification_sale_crm/migrations/9.0.1.0/openupgrade_analysis_work.txt new file mode 100644 index 000000000000..940be7cbcfb9 --- /dev/null +++ b/addons/gamification_sale_crm/migrations/9.0.1.0/openupgrade_analysis_work.txt @@ -0,0 +1,4 @@ +---Fields in module 'gamification_sale_crm'--- +---XML records in module 'gamification_sale_crm'--- +DEL gamification.goal.definition: gamification_sale_crm.definition_crm_nbr_call +# Removed xml record diff --git a/addons/gamification_sale_crm/migrations/9.0.1.0/post-migration.py b/addons/gamification_sale_crm/migrations/9.0.1.0/post-migration.py new file mode 100644 index 000000000000..14417b05dc9f --- /dev/null +++ b/addons/gamification_sale_crm/migrations/9.0.1.0/post-migration.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Tecnativa - Vicent Cubells +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + + +@openupgrade.migrate(use_env=True) +def migrate(env, version): + # Remove xml record related to non existent model crm_phonecall + env.ref('gamification_sale_crm.definition_crm_nbr_call').unlink() + openupgrade.load_data( + env.cr, + 'gamification_sale_crm', + 'migrations/9.0.1.0/noupdate_changes.xml', + ) diff --git a/openerp/openupgrade/doc/source/modules80-90.rst b/openerp/openupgrade/doc/source/modules80-90.rst index c382731f7f08..65d1c5d88728 100644 --- a/openerp/openupgrade/doc/source/modules80-90.rst +++ b/openerp/openupgrade/doc/source/modules80-90.rst @@ -106,7 +106,7 @@ Status : +-----------------------------------+-----------------------------------+ |gamification | | +-----------------------------------+-----------------------------------+ -|gamification_sale_crm | | +|gamification_sale_crm | Done | +-----------------------------------+-----------------------------------+ |google_account | | +-----------------------------------+-----------------------------------+