Merge lp:~therp-nl/openupgrade-addons/6.0-base_report_creator into lp:openupgrade-addons/6.0

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 4782
Proposed branch: lp:~therp-nl/openupgrade-addons/6.0-base_report_creator
Merge into: lp:openupgrade-addons/6.0
Diff against target: 46 lines (+36/-1)
2 files modified
base_report_creator/migrations/6.0.1.0/pre-migration.py (+34/-0)
base_report_creator/migrations/6.0.1.0/user_notes.txt (+2/-1)
To merge this branch: bzr merge lp:~therp-nl/openupgrade-addons/6.0-base_report_creator
Reviewer Review Type Date Requested Status
OpenUpgrade Committers Pending
Review via email: mp+111422@code.launchpad.net

Description of the change

base_report_creator: Set new 'result' model in existing act_windows

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'base_report_creator/migrations/6.0.1.0/pre-migration.py'
--- base_report_creator/migrations/6.0.1.0/pre-migration.py 1970-01-01 00:00:00 +0000
+++ base_report_creator/migrations/6.0.1.0/pre-migration.py 2012-06-21 15:03:37 +0000
@@ -0,0 +1,34 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# This migration script copyright (C) 2012 Therp BV (<http://therp.nl>)
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from openerp.openupgrade import openupgrade
23
24@openupgrade.migrate()
25def migrate(cr, version):
26 #the object to show a report is now base_report_creator_report.result
27 #but reports are still configured with base_report_creator.report
28 cr.execute("""
29 update ir_act_window set
30 res_model='base_report_creator_report.result'
31 where
32 res_model='base_report_creator.report'
33 and
34 context like '{''report_id'':%}'""")
035
=== modified file 'base_report_creator/migrations/6.0.1.0/user_notes.txt'
--- base_report_creator/migrations/6.0.1.0/user_notes.txt 2012-05-21 15:35:12 +0000
+++ base_report_creator/migrations/6.0.1.0/user_notes.txt 2012-06-21 15:03:37 +0000
@@ -1,1 +1,2 @@
1Nothing to do for module base_report_creator1This upgrade switches the model in the created reports' action windows to the new 'Report Result' model.
2

Subscribers

People subscribed via source and target branches