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

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 6613
Proposed branch: lp:~therp-nl/openupgrade-addons/6.1-prevent_automatic_chart_install
Merge into: lp:openupgrade-addons/6.1
Diff against target: 37 lines (+20/-0)
1 file modified
account/migrations/6.1.1.1/pre-migration.py (+20/-0)
To merge this branch: bzr merge lp:~therp-nl/openupgrade-addons/6.1-prevent_automatic_chart_install
Reviewer Review Type Date Requested Status
OpenUpgrade Committers Pending
Review via email: mp+134702@code.launchpad.net
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
=== modified file 'account/migrations/6.1.1.1/pre-migration.py'
--- account/migrations/6.1.1.1/pre-migration.py 2012-06-19 09:34:23 +0000
+++ account/migrations/6.1.1.1/pre-migration.py 2012-11-16 16:36:32 +0000
@@ -27,6 +27,25 @@
27logger = logging.getLogger('OpenUpgrade')27logger = logging.getLogger('OpenUpgrade')
28me = __file__28me = __file__
2929
30def prevent_account_installer(cr):
31 """
32 If the account installer has not run, e.g.
33 after manual installation of account chart
34 and if the company country is set, the
35 account module will install a random
36 chart on upgrading...
37 """
38 cr.execute("""
39 UPDATE ir_actions_todo
40 SET state = 'done'
41 WHERE state = 'open'
42 AND id IN (
43 SELECT res_id
44 FROM ir_model_data
45 WHERE name = 'account_configuration_installer_todo'
46 AND module = 'account')
47 """)
48
30def migrate(cr, version):49def migrate(cr, version):
31 try:50 try:
32 logger.info("%s called", me)51 logger.info("%s called", me)
@@ -55,6 +74,7 @@
55 else:74 else:
56 logger.info("%s: account type table, column report type"75 logger.info("%s: account type table, column report type"
57 "has already been preserved", me)76 "has already been preserved", me)
77 prevent_account_installer(cr)
5878
59 except Exception, e:79 except Exception, e:
60 raise osv.except_osv("OpenUpgrade", '%s: %s' % (me, e))80 raise osv.except_osv("OpenUpgrade", '%s: %s' % (me, e))

Subscribers

People subscribed via source and target branches