From 2757ec3d0cfbbe4cd951f5e4c5d369293fe87192 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 18 Jul 2016 16:51:57 +0200 Subject: [PATCH] [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 --- addons/web/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 038a317224b..3aa01cff047 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -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']