KERNEL: fix search with active args

bzr revid: mga@tinyerp.com-c764a90453457f30dce5b7d177f9a68950a76761
This commit is contained in:
Mantavya Gajjar
2007-04-11 06:54:19 +00:00
parent af911b0929
commit 6e0ae883e6
+3 -2
View File
@@ -1344,12 +1344,13 @@ class orm(object):
# records unless they were explicitely asked for
if 'active' in self._columns:
i = 0
active_found = False
while i<len(args):
if args[i][0]=='active':
if not args[i][2]:
del args[i]
active_found = True
i += 1
if i==len(args):
if not active_found:
args.append(('active', '=', 1))