← Back to team overview

credativ team mailing list archive

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

 

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

Requested reviews:
  OpenUpgrade Committers (openupgrade-committers)

For more details, see:
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-unset_demo_flag/+merge/174996
-- 
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-unset_demo_flag/+merge/174996
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-server/7.0-unset_demo_flag into lp:openupgrade-server.
=== modified file 'openerp/addons/base/migrations/7.0.1.3/pre-migration.py'
--- openerp/addons/base/migrations/7.0.1.3/pre-migration.py	2013-06-11 08:09:44 +0000
+++ openerp/addons/base/migrations/7.0.1.3/pre-migration.py	2013-07-16 12:39:29 +0000
@@ -47,6 +47,12 @@
     ('ir.actions.url', 'ir.actions.act_url'),
     ]
 
+def disable_demo_data(cr):
+    """ Disables the renewed loading of demo data """
+    openupgrade.logged_query(
+        cr,
+        "UPDATE ir_module_module SET demo = false")
+
 def migrate_ir_attachment(cr):
     # Data is now stored in db_datas column and datas is a function field
     # like in the document module in 6.1. If the db_datas column already
@@ -158,6 +164,7 @@
 
 @openupgrade.migrate()
 def migrate(cr, version):
+    disable_demo_data(cr)
     update_base_sql(cr)
     openupgrade.update_module_names(
         cr, module_namespec


Follow ups