From f848d140d033ec16d119fffacdeb47ad4cba44fd Mon Sep 17 00:00:00 2001 From: David Beal Date: Thu, 20 Aug 2015 15:51:01 +0200 Subject: [PATCH] [FIX] _get_inverse_name in case of space in name --- partner_firstname/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partner_firstname/models.py b/partner_firstname/models.py index 4500e478d..fe2b5aa09 100644 --- a/partner_firstname/models.py +++ b/partner_firstname/models.py @@ -146,7 +146,7 @@ class ResPartner(models.Model): parts = [name or False, False] # Guess name splitting else: - parts = name.split(" ", 1) + parts = name.strip().split(" ", 1) while len(parts) < 2: parts.append(False) return {"lastname": parts[0], "firstname": parts[1]}