summaryrefslogtreecommitdiff
path: root/odoo/addons/base/models/ir_qweb_fields.py
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2018-12-13 10:57:21 +0000
committerSébastien Theys <seb@odoo.com>2018-12-13 11:17:23 +0000
commit1fa10cbc5d8a02aea9910512007afbcfc61b37b3 (patch)
tree74c1c0e39cbb96e4341cc3504c68e4e2f4b3e045 /odoo/addons/base/models/ir_qweb_fields.py
parent287136b85e55b4abca03122c7b1c59099abd0854 (diff)
[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
Diffstat (limited to 'odoo/addons/base/models/ir_qweb_fields.py')
-rw-r--r--odoo/addons/base/models/ir_qweb_fields.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/addons/base/models/ir_qweb_fields.py b/odoo/addons/base/models/ir_qweb_fields.py
index 81e4c700d1a..1220b51a7c6 100644
--- a/odoo/addons/base/models/ir_qweb_fields.py
+++ b/odoo/addons/base/models/ir_qweb_fields.py
@@ -643,7 +643,7 @@ class Contact(models.AbstractModel):
opf = options and options.get('fields') or ["name", "address", "phone", "mobile", "email"]
opsep = options and options.get('separator') or "\n"
value = value.sudo().with_context(show_address=True)
- name_get = value.display_name
+ name_get = value.name_get()[0][1]
val = {
'name': name_get.split("\n")[0],