diff --git a/CHANGELOG b/CHANGELOG index 474ab85fb2..7945823fda 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Delete missing modules not activated when updating module list * Remove empty pages from notebook * Allow to store Dict as JSON on the database diff --git a/trytond/ir/module.py b/trytond/ir/module.py index 63f2cb3dd1..b666f5f513 100644 --- a/trytond/ir/module.py +++ b/trytond/ir/module.py @@ -285,6 +285,8 @@ class Module(ModelSQL, ModelView): modules = cls.search([]) name2module = dict((m.name, m) for m in modules) + cls.delete([m for m in modules + if m.state != 'activated' and m.name not in module_names]) # iterate through activated modules and mark them as being so for name in module_names: