diff --git a/modules/bp/pages/accountlist.py b/modules/bp/pages/accountlist.py index bc8437e0e11cf921c56cccbba4da300b0a402b49..b8a3c048b512e5dcd92b678538ca331318aac9db 100644 --- a/modules/bp/pages/accountlist.py +++ b/modules/bp/pages/accountlist.py @@ -103,14 +103,14 @@ def obj_label(self): return CleanText('.//div[@class="title"]/h3')(self).upper() def obj_ownership(self): - account_holder = CleanText('.//div[@class="title"]/span')(self) + account_holder = CleanText('.//div[@class="title"]/span')(self).lower() pattern = re.compile( r'(m|mr|me|mme|mlle|mle|ml)\.? (.*)\bou ?(m|mr|me|mme|mlle|mle|ml)?\b(.*)', re.IGNORECASE ) if pattern.search(account_holder): return AccountOwnership.CO_OWNER - elif all(n in account_holder for n in self.env['name'].split(' ')): + elif all(n in account_holder for n in self.env['name'].lower().split(' ')): return AccountOwnership.OWNER else: return AccountOwnership.ATTORNEY