From 5dad570423204c817f61d58b6d56bd376362e1b9 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Wed, 28 Aug 2019 08:33:54 +0000 Subject: [FIX] *: remove buggy calls to with_context When .with_context() is called with a dictionary as 1st positional argument, it will replace context (and not modify the referenced keys) It may create bugs when losing the content of the context (e.g. remove partner's language) This is a partial merge of #36164 without the inventory part as discussed. closes odoo/odoo#36729 X-forward: 4717ccfa Signed-off-by: Martin Trigaux (mat) --- addons/website_google_map/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/website_google_map/controllers/main.py') diff --git a/addons/website_google_map/controllers/main.py b/addons/website_google_map/controllers/main.py index 092fab26a03..afa7dd784f4 100644 --- a/addons/website_google_map/controllers/main.py +++ b/addons/website_google_map/controllers/main.py @@ -38,7 +38,7 @@ class GoogleMap(http.Controller): "counter": len(partners), "partners": [] } - for partner in partners.with_context({'show_address': True}): + for partner in partners.with_context(show_address=True): # TODO in master, do not use `escape` but `t-esc` in the qweb template. partner_data["partners"].append({ 'id': partner.id, -- cgit v1.2.3