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

Proposed by Holger Brunn (Therp)
Status: Merged
Merged at revision: 4789
Proposed branch: lp:~therp-nl/openupgrade-addons/6.0_membership
Merge into: lp:openupgrade-addons/6.0
Diff against target: 38 lines (+34/-0)
1 file modified
membership/migrations/6.0.0.1/post-migration.py (+34/-0)
To merge this branch: bzr merge lp:~therp-nl/openupgrade-addons/6.0_membership
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Approve
Review via email: mp+138885@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'membership/migrations/6.0.0.1/post-migration.py'
--- membership/migrations/6.0.0.1/post-migration.py 1970-01-01 00:00:00 +0000
+++ membership/migrations/6.0.0.1/post-migration.py 2012-12-09 16:46:23 +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 openupgrade import openupgrade
23
24@openupgrade.migrate()
25def migrate(cr, version):
26 cr.execute('''
27 update membership_membership_line set
28 membership_id=(select product_id
29 from account_invoice_line
30 where id=account_invoice_line),
31 member_price=(select price_subtotal
32 from account_invoice_line
33 where id=account_invoice_line),
34 date=create_date''')

Subscribers

People subscribed via source and target branches