From 1fa10cbc5d8a02aea9910512007afbcfc61b37b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Thu, 13 Dec 2018 10:57:21 +0000 Subject: [FIX] base,website_google_map: fix partner address not showing Following commit 983c7e81529eb26a7a756e7d875b5638a26a3733. `_compute_display_name` is overridden in partner to force `show_adress` and some other context variables to None. When those values are in the context, calling `display_name` can give a different result than calling `name_get()[0][1]`. This commit reverts the changes of the mentioned commit where the behavior is actually different, that is, when `show_address` is in the context. It also adds a comment on the `_compute_display_name` method to avoid further mistakes. closes odoo/odoo#29510 --- addons/website_google_map/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/website_google_map/controllers') diff --git a/addons/website_google_map/controllers/main.py b/addons/website_google_map/controllers/main.py index 169eb46f7c5..092fab26a03 100644 --- a/addons/website_google_map/controllers/main.py +++ b/addons/website_google_map/controllers/main.py @@ -43,7 +43,7 @@ class GoogleMap(http.Controller): partner_data["partners"].append({ 'id': partner.id, 'name': escape(partner.name), - 'address': escape('\n'.join(partner.display_name.split('\n')[1:])), + 'address': escape('\n'.join(partner.name_get()[0][1].split('\n')[1:])), 'latitude': escape(str(partner.partner_latitude)), 'longitude': escape(str(partner.partner_longitude)), }) -- cgit v1.2.3