From 306b6ddf8c72bb0f8955738327fc8e903499c310 Mon Sep 17 00:00:00 2001 From: ced <> Date: Fri, 22 Dec 2006 09:13:15 +0000 Subject: [PATCH] MIGRATE: fix module update bzr revid: ced-d459df1742d3c3fa31771713f07fb6e3bb70a5bf --- doc/migrate/3.4.0-4.0.0/README | 2 -- doc/migrate/3.4.0-4.0.0/pre.py | 11 +++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/migrate/3.4.0-4.0.0/README b/doc/migrate/3.4.0-4.0.0/README index b8d34f1e668..bf51831fef6 100644 --- a/doc/migrate/3.4.0-4.0.0/README +++ b/doc/migrate/3.4.0-4.0.0/README @@ -6,8 +6,6 @@ if you added or modified some code to the default Tiny ERP distribution. To migrate a 3.4.0 server to version 4.0.0 you should: -- run "Download module list" in tinyERP server 3.4.0 from administration>Module Management>Download module list - - stop Tiny ERP server 3.4.0 - backup your database diff --git a/doc/migrate/3.4.0-4.0.0/pre.py b/doc/migrate/3.4.0-4.0.0/pre.py index 9a533cad105..46b9966c052 100644 --- a/doc/migrate/3.4.0-4.0.0/pre.py +++ b/doc/migrate/3.4.0-4.0.0/pre.py @@ -93,6 +93,17 @@ def change_column(cr, table, column, new_type, copy): change_column(cr, 'crm_case', 'date_closed', 'timestamp', True) cr.commit() +# -------------------- # +# add module if needed # +# -------------------- # + +cr.execute("SELECT name FROM ir_module_module") +if not cr.rowcount: + for module in ('base', 'marketing', 'subscription', 'account', 'base_partner_relation', 'audittrail', 'account_followup', 'product', 'hr', 'l10n_simple', 'crm', 'stock', 'hr_timesheet', 'purchase', 'report_purchase', 'mrp', 'sale', 'report_sale', 'delivery', 'project', 'sale_crm', 'hr_timesheet_project', 'scrum', 'report_project'): + cr.execute("INSERT INTO ir_module_module (name, state) VALUES ('%s', 'installed')" % module) + cr.commit() + + # ----------------------------------------------------- # # add some fields (which cannot be added automatically) # # ----------------------------------------------------- #