add query to uninstall modules
This commit is contained in:
parent
7f4c23f26c
commit
7f0e1802b7
7
upgrade
7
upgrade
|
@ -111,8 +111,15 @@ def uninstall_modules():
|
|||
print 'DELETING', model
|
||||
execute('DELETE FROM "' + model.replace('.', '_')
|
||||
+ '" WHERE id=%s', db_id)
|
||||
|
||||
execute('DELETE FROM ir_model_data WHERE module=%s', module)
|
||||
|
||||
execute('DELETE FROM mass_editing WHERE model IN (SELECT '
|
||||
'id FROM ir_model WHERE module NOT IN (SELECT name FROM %s))' %
|
||||
module_table)
|
||||
execute('DELETE FROM ir_trigger WHERE model IN (SELECT '
|
||||
'id FROM ir_model WHERE module NOT IN (SELECT name FROM %s))' %
|
||||
module_table)
|
||||
execute('DELETE FROM ir_action_act_window WHERE res_model IN (SELECT '
|
||||
'model FROM ir_model WHERE module NOT IN (SELECT name FROM %s))' %
|
||||
module_table)
|
||||
|
|
Loading…
Reference in New Issue