Merge lp:~therp-nl/openupgrade-addons/6.1-lp1068554-swap_employee_category_rel_columns into lp:openupgrade-addons/6.1

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 6609
Proposed branch: lp:~therp-nl/openupgrade-addons/6.1-lp1068554-swap_employee_category_rel_columns
Merge into: lp:openupgrade-addons/6.1
Diff against target: 67 lines (+47/-0)
3 files modified
hr/migrations/6.1.1.1/pre-migration.py (+10/-0)
hr_timesheet_sheet/migrations/6.1.1.0/data.xml (+10/-0)
hr_timesheet_sheet/migrations/6.1.1.0/post-migrate.py (+27/-0)
To merge this branch: bzr merge lp:~therp-nl/openupgrade-addons/6.1-lp1068554-swap_employee_category_rel_columns
Reviewer Review Type Date Requested Status
OpenUpgrade Committers Pending
Review via email: mp+130517@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Also includes a lingering commit that fixes the opening of the current timesheet.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr/migrations/6.1.1.1/pre-migration.py'
2--- hr/migrations/6.1.1.1/pre-migration.py 2012-06-19 09:34:23 +0000
3+++ hr/migrations/6.1.1.1/pre-migration.py 2012-10-19 10:08:24 +0000
4@@ -23,6 +23,16 @@
5
6 @openupgrade.migrate()
7 def migrate(cr, version):
8+
9+ openupgrade.rename_columns(cr, {
10+ # many2many table square dance
11+ 'employee_category_rel': [
12+ ('emp_id', 'emp_id_tmp'),
13+ ('category_id', 'emp_id'),
14+ ('emp_id_tmp', 'category_id'),
15+ ],
16+ })
17+
18 openupgrade.rename_tables(cr, [('hr_employee_marital_status', openupgrade.get_legacy_name('hr_employee_marital_status'))])
19 openupgrade.rename_columns(cr,
20 {
21
22=== added file 'hr_timesheet_sheet/migrations/6.1.1.0/data.xml'
23--- hr_timesheet_sheet/migrations/6.1.1.0/data.xml 1970-01-01 00:00:00 +0000
24+++ hr_timesheet_sheet/migrations/6.1.1.0/data.xml 2012-10-19 10:08:24 +0000
25@@ -0,0 +1,10 @@
26+<?xml version="1.0" ?>
27+<openerp>
28+ <data noupdate="1">
29+ <!-- OpenUpgrade: overwrite the original code definition
30+ from 6.0 that still has the ids argument -->
31+ <record id="ir_actions_server_timsheet_sheet" model="ir.actions.server">
32+ <field eval="&quot;&quot;&quot;action = pool.get('hr.timesheet.current.open').open_timesheet(cr, uid, None, context)&quot;&quot;&quot;" name="code"/>
33+ </record>
34+ </data>
35+</openerp>
36
37=== added file 'hr_timesheet_sheet/migrations/6.1.1.0/post-migrate.py'
38--- hr_timesheet_sheet/migrations/6.1.1.0/post-migrate.py 1970-01-01 00:00:00 +0000
39+++ hr_timesheet_sheet/migrations/6.1.1.0/post-migrate.py 2012-10-19 10:08:24 +0000
40@@ -0,0 +1,27 @@
41+# -*- coding: utf-8 -*-
42+##############################################################################
43+#
44+# OpenERP, Open Source Management Solution
45+# This module copyright (C) 2012 Therp BV (<http://therp.nl>).
46+#
47+# This program is free software: you can redistribute it and/or modify
48+# it under the terms of the GNU Affero General Public License as
49+# published by the Free Software Foundation, either version 3 of the
50+# License, or (at your option) any later version.
51+#
52+# This program is distributed in the hope that it will be useful,
53+# but WITHOUT ANY WARRANTY; without even the implied warranty of
54+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55+# GNU Affero General Public License for more details.
56+#
57+# You should have received a copy of the GNU Affero General Public License
58+# along with this program. If not, see <http://www.gnu.org/licenses/>.
59+#
60+##############################################################################
61+
62+from openerp.openupgrade import openupgrade
63+
64+@openupgrade.migrate
65+def migrate(cr, version):
66+ openupgrade.load_data(
67+ cr, 'hr_timesheet_sheet', 'migrations/6.1.1.0/data.xml')

Subscribers

People subscribed via source and target branches