diff options
| author | Xavier Morel <xmo@openerp.com> | 2010-11-12 11:41:14 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2010-11-12 11:41:14 +0100 |
| commit | 7b05292497e00111550fd69cede56ef7b1c6535e (patch) | |
| tree | 1d216fb537b01c1452b7568f90f313924c069bed /bin/addons/base/module/module.py | |
| parent | 1fff5e28f1301adc89a0d089c97228e337b56b85 (diff) | |
[IMP] simplify summing operation (sum builtin was added in 2.3)
bzr revid: xmo@openerp.com-20101112104114-mdooszav0ox220nb
Diffstat (limited to 'bin/addons/base/module/module.py')
| -rw-r--r-- | bin/addons/base/module/module.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 3dcd5b550c9..81985332157 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -53,7 +53,8 @@ class module_category(osv.osv): result = dict(cr.fetchall()) for id in ids: cr.execute('select id from ir_module_category where parent_id=%s', (id,)) - result[id] = reduce(lambda x,y:x+y, [result.get(c, 0) for (c,) in cr.fetchall()], result.get(id, 0)) + result[id] = sum([result.get(c, 0) for (c,) in cr.fetchall()], + result.get(id, 0)) return result _columns = { |
