MIGRATE: fix module update
bzr revid: ced-d459df1742d3c3fa31771713f07fb6e3bb70a5bfmaster
parent
2dd845c3a1
commit
306b6ddf8c
|
@ -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
|
||||
|
|
|
@ -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) #
|
||||
# ----------------------------------------------------- #
|
||||
|
|
Loading…
Reference in New Issue