Commit 0ebb6be1 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[s2e] Ignore the 'ETOILE' prefix for account typing

Most accounts are called 'PEE' or 'PEI' but some accounts start with
'ETOILE PEI' so we must take the second element of the label in these
cases to type the account.
parent 163abc80
......@@ -385,6 +385,8 @@ class AccountsPage(LoggedPage, MultiPage):
obj_label = Env('label')
def obj_type(self):
if Field('label')(self).startswith('ETOILE'):
return self.page.TYPES.get(Field('label')(self).split()[1].upper(), Account.TYPE_UNKNOWN)
return self.page.TYPES.get(Field('label')(self).split()[0].upper(), Account.TYPE_UNKNOWN)
def obj_balance(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment