[FIX] Collateral effect merging query params

The keep_query() function has to **keep** all or selected query parameters
or add new ones but not change them by merging those with the same name.

That unnecessary parameter merge breaks the *Change language* feature in the
website_sale module when *Website -> Customize -> Product Attribute's filters*
is enabled and there's 2 or more select type attributes created and at least
one of them is selected.

Merging params was added in:
* 8.0: commit 7759af7c4c
* 9.0: commit daf8bdf688
This commit is contained in:
Eric Antones 2015-12-11 12:21:54 +01:00 committed by Christophe Matthieu
parent 2f056ae032
commit 1d97ddfd81
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ def keep_query(*keep_params, **additional_params):
for keep_param in keep_params:
for param in fnmatch.filter(qs_keys, keep_param):
if param not in additional_params and param in qs_keys:
params[param] = ','.join(request.httprequest.args.getlist(param))
params[param] = request.httprequest.args.getlist(param)
return werkzeug.urls.url_encode(params)
class view_custom(osv.osv):