From edf78c49d7d2d20a2c6d12b71a6248cb26d73594 Mon Sep 17 00:00:00 2001 From: Arthur Vuillard Date: Mon, 2 Jun 2014 11:35:59 +0200 Subject: [PATCH 1/3] Just analyze an empty migration --- .../analytic/migrations/8.0.1.1/openupgrade_analysis_work.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 addons/analytic/migrations/8.0.1.1/openupgrade_analysis_work.txt diff --git a/addons/analytic/migrations/8.0.1.1/openupgrade_analysis_work.txt b/addons/analytic/migrations/8.0.1.1/openupgrade_analysis_work.txt new file mode 100644 index 000000000000..92b5d69c7395 --- /dev/null +++ b/addons/analytic/migrations/8.0.1.1/openupgrade_analysis_work.txt @@ -0,0 +1,4 @@ +---Fields in module 'analytic'--- +analytic / account.analytic.account / message_last_post (datetime) : NEW +### NOTHING TO DO : field added in mail.message +---XML records in module 'analytic'--- From ae5d12b2f864f8c48c0141be3355d38a6422c15e Mon Sep 17 00:00:00 2001 From: Arthur Vuillard Date: Mon, 2 Jun 2014 17:20:25 +0200 Subject: [PATCH 2/3] Analytic migration : initialize message_last_post field on account.analytic.account --- .../8.0.1.1/openupgrade_analysis_work.txt | 2 +- .../migrations/8.0.1.1/pre-migration.py | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 addons/analytic/migrations/8.0.1.1/pre-migration.py diff --git a/addons/analytic/migrations/8.0.1.1/openupgrade_analysis_work.txt b/addons/analytic/migrations/8.0.1.1/openupgrade_analysis_work.txt index 92b5d69c7395..43a5d440a0a9 100644 --- a/addons/analytic/migrations/8.0.1.1/openupgrade_analysis_work.txt +++ b/addons/analytic/migrations/8.0.1.1/openupgrade_analysis_work.txt @@ -1,4 +1,4 @@ ---Fields in module 'analytic'--- analytic / account.analytic.account / message_last_post (datetime) : NEW -### NOTHING TO DO : field added in mail.message +### Set the value for message_last_post field ---XML records in module 'analytic'--- diff --git a/addons/analytic/migrations/8.0.1.1/pre-migration.py b/addons/analytic/migrations/8.0.1.1/pre-migration.py new file mode 100644 index 000000000000..f2ea3b96be90 --- /dev/null +++ b/addons/analytic/migrations/8.0.1.1/pre-migration.py @@ -0,0 +1,33 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module 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 openerp import pooler, SUPERUSER_ID +from openerp.openupgrade import openupgrade, openupgrade_80 + + +@openupgrade.migrate() +def migrate(cr, version): + pool = pooler.get_pool(cr.dbname) + uid = SUPERUSER_ID + openupgrade_80.set_message_last_post( + cr, uid, pool, ['account.analytic.account'] + ) From a5fa4b227a847b8c9b707b0e40dd446c31853366 Mon Sep 17 00:00:00 2001 From: Arthur Vuillard Date: Tue, 3 Jun 2014 10:04:26 +0200 Subject: [PATCH 3/3] Update status for analytic module --- 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 b698d878a1d8..8cb80fb7a37e 100644 --- a/openerp/openupgrade/doc/source/modules70-80.rst +++ b/openerp/openupgrade/doc/source/modules70-80.rst @@ -50,7 +50,7 @@ Status : +-----------------------------------+-----------------------------------+ |account_voucher | | +-----------------------------------+-----------------------------------+ -|analytic | | +|analytic | done | +-----------------------------------+-----------------------------------+ |analytic_contract_hr_expense | | +-----------------------------------+-----------------------------------+