projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f65174
)
refactoring
author
Stephane Wirtel
<stephane@tinyerp.com>
Mon, 28 Jul 2008 14:02:22 +0000
(16:02 +0200)
committer
Stephane Wirtel
<stephane@tinyerp.com>
Mon, 28 Jul 2008 14:02:22 +0000
(16:02 +0200)
bzr revid: stephane@tinyerp.com-
20080728140222
-9qj0d823pottrnxf
bin/osv/orm.py
patch
|
blob
|
history
diff --git
a/bin/osv/orm.py
b/bin/osv/orm.py
index
39690f4
..
c613801
100644
(file)
--- a/
bin/osv/orm.py
+++ b/
bin/osv/orm.py
@@
-2187,12
+2187,7
@@
class orm(orm_template):
# if the object has a field named 'active', filter out all inactive
# records unless they were explicitely asked for
if 'active' in self._columns and (active_test and context.get('active_test', True)):
- i = 0
- active_found = False
- while i<len(args):
- if args[i][0]=='active':
- active_found = True
- i += 1
+ active_found = reduce( lambda x, y: x or y == 'active', args, False )
if not active_found:
args.append(('active', '=', 1))