From d30c3cf4e5ea8f344a95153247b74cf547e8172e Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 28 Dec 2006 11:23:16 +0000 Subject: [PATCH] Add remove old menu to migrate script bzr revid: ced-6724d59e54acf84ece6360543b8b232e10cede7f --- doc/migrate/4.0.0-x.x.x/post.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/migrate/4.0.0-x.x.x/post.py b/doc/migrate/4.0.0-x.x.x/post.py index dc1dba8577a..ed0e00f9440 100644 --- a/doc/migrate/4.0.0-x.x.x/post.py +++ b/doc/migrate/4.0.0-x.x.x/post.py @@ -79,5 +79,12 @@ cr = db.cursor() cr.execute("update sale_order_line set delay = pt.sale_delay from product_product as po, product_template as pt where product_id = po.id and po.product_tmpl_id = pt.id") cr.commit() +# --------------- # +# remove old menu # +# --------------- # + +cr.execute("delete from ir_ui_menu where (id not in (select parent_id from ir_ui_menu where parent_id is not null)) and (id not in (select res_id from ir_values where model='ir.ui.menu'))") +cr.commit() + cr.close()