Merge lp:~savoirfairelinux-openerp/openerp-mgmtsystem/upgrade-param-fix into lp:openerp-mgmtsystem

Status: Merged
Approved by: Pedro Manuel Baeza on 2014-03-21
Approved revision: 98
Merged at revision: 99
Proposed branch: lp:~savoirfairelinux-openerp/openerp-mgmtsystem/upgrade-param-fix
Merge into: lp:openerp-mgmtsystem
Diff against target: 25 lines (+3/-1)
1 file modified
mgmtsystem_action/migrations/7.0.1.0/post-migration.py (+3/-1)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/openerp-mgmtsystem/upgrade-param-fix
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza code review 2014-03-21 Approve on 2014-03-21
Stefan Rijnhart (Opener) 2014-03-21 Approve on 2014-03-21
Guewen Baconnier @ Camptocamp 2014-03-21 Approve on 2014-03-21
Maxime Chambreuil (http://www.savoirfairelinux.com) 2014-03-21 Pending
Review via email: mp+212161@code.launchpad.net

Description of the change

To post a comment you must log in.
review: Approve

Blame the reviewers ;-)

review: Approve
Pedro Manuel Baeza (pedro.baeza) wrote :

This kind of things happens to all of us...

Regards.

review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mgmtsystem_action/migrations/7.0.1.0/post-migration.py'
2--- mgmtsystem_action/migrations/7.0.1.0/post-migration.py 2014-03-14 15:53:50 +0000
3+++ mgmtsystem_action/migrations/7.0.1.0/post-migration.py 2014-03-21 13:57:49 +0000
4@@ -24,10 +24,12 @@
5 import logging
6 logger = logging.getLogger('upgrade')
7
8+
9 def get_legacy_name(original_name):
10 return 'legacy_' + ('_').join(
11 map(str, release.version_info[0:2])) + '_' + original_name
12
13+
14 def logged_query(cr, query, args=None):
15 if args is None:
16 args = []
17@@ -60,7 +62,7 @@
18 SELECT column_name
19 FROM information_schema.columns
20 WHERE table_name = 'mgmtsystem_action'
21- AND column_name = %s""", legacy_stage_name)
22+ AND column_name = %s""", [legacy_stage_name])
23 if not cr.fetchall():
24 return
25 query = """