← Back to team overview

credativ team mailing list archive

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

 

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

Requested reviews:
  OpenUpgrade Committers (openupgrade-committers)

For more details, see:
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-drop_obsolete_module/+merge/176762
-- 
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-drop_obsolete_module/+merge/176762
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-server/7.0-drop_obsolete_module 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-24 18:54:38 +0000
@@ -156,6 +156,17 @@
                 "VALUES(%s, 'res.partner', 'base', 'partner_root', TRUE) ",
                 (partner_id,))
 
+def remove_obsolete_modules(cr):
+    obsolete_modules = (
+        'base_tools',
+        )
+    cr.execute(
+        """
+        UPDATE ir_module_module
+        SET state = 'to remove'
+        WHERE name in %s
+        """, (obsolete_modules,))
+
 @openupgrade.migrate()
 def migrate(cr, version):
     update_base_sql(cr)
@@ -168,3 +179,4 @@
     openupgrade.rename_models(cr, model_renames)
     migrate_ir_attachment(cr)
     create_users_partner(cr)
+    remove_obsolete_modules(cr)


Follow ups