[FIX] web: prevent kwargs position confusion

The fith arguemnt of the search method in count in new API.
Passing all arguments as positional arguments will make the context passed for
the value of the `count` argument.

bbc67ec is a similar fix in 9.0

Closes #12830
This commit is contained in:
Stefan Rijnhart
2016-07-19 11:19:46 +02:00
committed by Martin Trigaux
parent 17a1304285
commit 2757ec3d0c
+1 -1
View File
@@ -1432,7 +1432,7 @@ class ExportFormat(object):
Model = request.session.model(model)
context = dict(request.context or {}, **params.get('context', {}))
ids = ids or Model.search(domain, 0, False, False, context)
ids = ids or Model.search(domain, offset=0, limit=False, order=False, context=context)
if not request.env[model]._is_an_ordinary_table():
fields = [field for field in fields if field['name'] != 'id']