Fix wrong instantiation when removing module

issue3025
review689002
This commit is contained in:
Cédric Krier committed 2013-02-26 13:03:31 +01:00
1 parent 4790d575b0
commit e30c4e51a1
1 file changed
+2 -1
+2 -1
View File
@@ -404,7 +404,8 @@ def load_modules(database_name, pool, update=False, lang=None):
'WHERE module = %s ' \
'ORDER BY id DESC', (mod_name,))
for rmod, rid in cursor.fetchall():
pool.get(rmod).delete([rmod(rid)])
Model = pool.get(rmod)
Model.delete([Model(rid)])
cursor.commit()
cursor.execute("UPDATE ir_module_module SET state = %s " \
"WHERE state IN ('to remove')", ('uninstalled',))