From c4cd95b4455dcdc8dfd97c896d95a4a7f1ac2aa2 Mon Sep 17 00:00:00 2001 From: Arthur Vuillard Date: Mon, 2 Jun 2014 16:01:38 +0200 Subject: [PATCH 1/2] email_template migration --- .../8.0.1.1/openupgrade_analysis_work.txt | 18 +++++++++++ .../migrations/8.0.1.1/pre-migration.py | 32 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 addons/email_template/migrations/8.0.1.1/openupgrade_analysis_work.txt create mode 100644 addons/email_template/migrations/8.0.1.1/pre-migration.py diff --git a/addons/email_template/migrations/8.0.1.1/openupgrade_analysis_work.txt b/addons/email_template/migrations/8.0.1.1/openupgrade_analysis_work.txt new file mode 100644 index 000000000000..fff5fce00b72 --- /dev/null +++ b/addons/email_template/migrations/8.0.1.1/openupgrade_analysis_work.txt @@ -0,0 +1,18 @@ +---Fields in module 'email_template'--- + +email_template / email.template / body_html (text) : type is now 'html' ('text') +# Nothing to do : the database column type did not change + +email_template / email.template / email_recipients (char) : DEL +email_template / email.template / partner_to (char) : NEW +# Field renamed + +email_template / email.template / use_default_to (boolean) : NEW +email_template / ir.actions.server / template_id (many2one) : NEW relation: email.template +# New columns : ok + +---XML records in module 'email_template'--- +NEW email.template: email_template.email_template_partner +NEW ir.actions.act_window: base.action_partner_mass_mail +NEW ir.ui.view: email_template.view_server_action_form_template +# New : ok diff --git a/addons/email_template/migrations/8.0.1.1/pre-migration.py b/addons/email_template/migrations/8.0.1.1/pre-migration.py new file mode 100644 index 000000000000..c94a8c996f88 --- /dev/null +++ b/addons/email_template/migrations/8.0.1.1/pre-migration.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This migration script copyright (C) 2014 Akretion +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openupgrade import openupgrade + +column_renames = { + 'email_template': [ + ('email_recipients', 'partner_to'), + ] +} + +@openupgrade.migrate() +def migrate(cr, version): + openupgrade.rename_columns(cr, column_renames) From 81f1f4cbba6cab09d20f763834383daed31ffa07 Mon Sep 17 00:00:00 2001 From: Arthur Vuillard Date: Tue, 3 Jun 2014 11:33:47 +0200 Subject: [PATCH 2/2] Add status for email_template module in the doc --- openerp/openupgrade/doc/source/modules70-80.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/openupgrade/doc/source/modules70-80.rst b/openerp/openupgrade/doc/source/modules70-80.rst index 8cb80fb7a37e..98bd664b9814 100644 --- a/openerp/openupgrade/doc/source/modules70-80.rst +++ b/openerp/openupgrade/doc/source/modules70-80.rst @@ -118,7 +118,7 @@ Status : +-----------------------------------+-----------------------------------+ |edi | | +-----------------------------------+-----------------------------------+ -|email_template | | +|email_template | done | +-----------------------------------+-----------------------------------+ |event | | +-----------------------------------+-----------------------------------+