From 43579e17c2d9ad548eadaa069b52853d2204c5e6 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Sun, 10 Jan 2010 19:31:46 +0100 Subject: [PATCH] [imp] batched modules update in module installer bzr revid: xmo@tinyerp.com-20100110183146-oe6d0k0a977s2hc0 --- bin/addons/base/res/res_config.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/addons/base/res/res_config.py b/bin/addons/base/res/res_config.py index db93e152f3c..204be08c9d0 100644 --- a/bin/addons/base/res/res_config.py +++ b/bin/addons/base/res/res_config.py @@ -142,14 +142,15 @@ class res_config_installer(osv.osv_memory): def execute(self, cr, uid, ids, context=None): modules = self.pool.get('ir.module.module') - for module in self._modules_to_install(cr, uid, ids, context=context): - self.logger.notifyChannel( - 'installer', netsvc.LOG_INFO, - 'Selecting addon "%s" to install'%module) - modules.button_install( - cr, uid, - modules.search(cr, uid, [('name','=',module)]), - context=context) + to_install = list(self._modules_to_install( + cr, uid, ids, context=context)) + self.logger.notifyChannel( + 'installer', netsvc.LOG_INFO, + 'Selecting addons %s to install'%to_install) + modules.state_update( + cr, uid, + modules.search(cr, uid, [('name','in',to_install)]), + 'to install', ['uninstalled'], context=context) cr.commit() pooler.restart_pool(cr.dbname, update_module=True)