[IMP] add logging when server sends data to client, also bail out early from sending addons if we know we'll have nothing to send (client requested an empty set of web addons)

bzr revid: xmo@openerp.com-20100928123452-vhpoo1izp29lppo3
This commit is contained in:
Xavier Morel
2010-09-28 14:34:52 +02:00
parent 5577f2bc4a
commit c5f030d5e0
+4
View File
@@ -72,6 +72,7 @@ module_category()
class module(osv.osv):
_name = "ir.module.module"
_description = "Module"
__logger = logging.getLogger('base.' + _name)
def get_module_info(self, name):
info = {}
@@ -498,6 +499,9 @@ class module(osv.osv):
modules = self.browse(cr, uid,
self.search(cr, uid, [('name', 'in', names)], context=context),
context=context)
if not modules: return []
self.__logger.info('Sending web content of modules %s '
'to web client', names)
return [
{'name': module.name,
'depends': [dep.name for dep in module.dependencies_id