ORM:
If select unactive ressources: show all ressources, not only unactive ones SALE: View small bugfix to not show the pos view Purchase Group Wizard: Bugfix that prevented some grouping of PO bzr revid: pinky-38675a28a7f3b281c790ab6ae44be3dd6c913d11
This commit is contained in:
parent
d19a5bbec6
commit
84c4283c1d
|
@ -1244,7 +1244,6 @@ class orm(object):
|
||||||
'relate': resrelate
|
'relate': resrelate
|
||||||
}
|
}
|
||||||
|
|
||||||
print result
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
# TODO: ameliorer avec NULL
|
# TODO: ameliorer avec NULL
|
||||||
|
@ -1307,16 +1306,20 @@ class orm(object):
|
||||||
return (qu1,qu2)
|
return (qu1,qu2)
|
||||||
|
|
||||||
def search(self, cr, user, args, offset=0, limit=None, order=None):
|
def search(self, cr, user, args, offset=0, limit=None, order=None):
|
||||||
# if the object has a field named 'active', filter out all inactive
|
# if the object has a field named 'active', filter out all inactive
|
||||||
# records unless they were explicitely asked for
|
# records unless they were explicitely asked for
|
||||||
if 'active' in self._columns:
|
if 'active' in self._columns:
|
||||||
ok = False
|
i = 0
|
||||||
for a in args:
|
while i<len(args):
|
||||||
if a[0]=='active':
|
if args[i][0]=='active':
|
||||||
ok = True
|
if not args[i][2]:
|
||||||
if not ok:
|
del args[i]
|
||||||
|
break
|
||||||
|
i += 1
|
||||||
|
if i==len(args):
|
||||||
args.append(('active', '=', 1))
|
args.append(('active', '=', 1))
|
||||||
|
|
||||||
|
|
||||||
# if the object has a field named 'company_id', filter out all
|
# if the object has a field named 'company_id', filter out all
|
||||||
# records which do not concern the current company (the company
|
# records which do not concern the current company (the company
|
||||||
# of the current user) or its "childs"
|
# of the current user) or its "childs"
|
||||||
|
|
Loading…
Reference in New Issue