diff options
| author | Najlaa <nel@silver> | 2008-12-10 15:11:28 +0100 |
|---|---|---|
| committer | Najlaa <nel@silver> | 2008-12-10 15:11:28 +0100 |
| commit | 5a836ab2754fa552b68cc5a70a52c50a2c3633da (patch) | |
| tree | d5baa9d7b53d7111f9441b7983d8f840c2c45bf9 /bin/addons/base/module/module.py | |
| parent | 02663d978045949ba95de5bed40eea043cd7ee6d (diff) | |
[FIX] correct graph loading when updating database or installing new module from command line
lp bug: https://launchpad.net/bugs/304807 fixed
bzr revid: nel@silver-20081210141128-oaknnb0rzj68htio
Diffstat (limited to 'bin/addons/base/module/module.py')
| -rw-r--r-- | bin/addons/base/module/module.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 0cb090c2bc7..0e5b976c97c 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -261,6 +261,7 @@ class module(osv.osv): def button_upgrade(self, cr, uid, ids, context=None): depobj = self.pool.get('ir.module.module.dependency') todo = self.browse(cr, uid, ids, context=context) + to_install = set() i = 0 while i<len(todo): mod = todo[i] @@ -272,7 +273,10 @@ class module(osv.osv): for dep in depobj.browse(cr, uid, iids, context=context): if dep.module_id.state=='installed': todo.append(dep.module_id) + elif dep.module_id.state == 'uninstalled': + to_install.add(dep.module_id.id) self.write(cr,uid, map(lambda x: x.id, todo), {'state':'to upgrade'}, context=context) + self.button_install(cr, uid, list(to_install)) return True def button_upgrade_cancel(self, cr, uid, ids, context={}): |
