← Back to team overview

credativ team mailing list archive

[Merge] lp:~therp-nl/openupgrade-server/7.0-predictable_legacy_names into lp:openupgrade-server

 

Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/openupgrade-server/7.0-predictable_legacy_names into lp:openupgrade-server.

Requested reviews:
  OpenUpgrade Committers (openupgrade-committers)

For more details, see:
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-predictable_legacy_names/+merge/150065
-- 
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-predictable_legacy_names/+merge/150065
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-server/7.0-predictable_legacy_names into lp:openupgrade-server.
=== modified file 'openerp/openupgrade/openupgrade.py'
--- openerp/openupgrade/openupgrade.py	2012-11-24 22:33:20 +0000
+++ openerp/openupgrade/openupgrade.py	2013-02-22 15:12:26 +0000
@@ -2,7 +2,7 @@
 ##############################################################################
 #
 #    OpenERP, Open Source Management Solution
-#    This module copyright (C) 2011-2012 Therp BV (<http://therp.nl>)
+#    This module copyright (C) 2011-2013 Therp BV (<http://therp.nl>)
 #
 #    This program is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Affero General Public License as
@@ -324,8 +324,9 @@
     :param original_name: the original name of the column
     :param version: current version as passed to migrate()
     """
-    return 'openupgrade_legacy_'+('_').join(map(str, release.version_info))+'_'+original_name
-        
+    return 'openupgrade_legacy_'+('_').join(
+        map(str, release.version_info[0:2]))+'_'+original_name
+
 def migrate():
     """
     This is the decorator for the migrate() function


Follow ups