Fix wrong instantiation when removing module
issue3025 review689002
This commit is contained in:
1 parent
4790d575b0
commit
e30c4e51a1
1 file changed
+2
-1
@@ -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',))
|
||||
|
||||
Reference in new issue
Block a user