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

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

Subscribers

People subscribed via source and target branches