[IMP] base: res_partner imp name_get

Added an option to display the address of the partner on a single line.
This commit is contained in:
Rémi Rahir
2018-08-10 18:33:15 +02:00
parent 6caf5ed7d2
commit a07902ffa8
+2
View File
@@ -613,6 +613,8 @@ class Partner(models.Model):
name = name + "\n" + partner._display_address(without_company=True)
name = name.replace('\n\n', '\n')
name = name.replace('\n\n', '\n')
if self._context.get('address_inline'):
name = name.replace('\n', ', ')
if self._context.get('show_email') and partner.email:
name = "%s <%s>" % (name, partner.email)
if self._context.get('html_format'):