Browse Source

Merge PR #1026 into 14.0

Signed-off-by NL66278
14.0
OCA-git-bot 4 years ago
parent
commit
ab62437f3a
  1. 5
      partner_firstname/models/res_partner.py

5
partner_firstname/models/res_partner.py

@ -127,6 +127,11 @@ class ResPartner(models.Model):
Removes leading, trailing and duplicated whitespace. Removes leading, trailing and duplicated whitespace.
""" """
if isinstance(name, bytes):
# With users coming from LDAP, name can be a byte encoded string.
# This happens with FreeIPA for instance.
name = name.decode("utf-8")
try: try:
name = " ".join(name.split()) if name else name name = " ".join(name.split()) if name else name
except UnicodeDecodeError: except UnicodeDecodeError:

Loading…
Cancel
Save