The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

Commit 24bc726c authored by ROLY Dorian's avatar ROLY Dorian Committed by Vincent A

[axa] Fixed a market account being typed as checking account

A market account was incorrectly recognized as a checking account,
The account in question was part of package deal with a checking account,
and the caption of the account did not mention its type explicitly,
made sure the two were separated and typed correctly

Closes: 12639@zendesk
parent 8f6ccb18
......@@ -77,15 +77,15 @@ def js2args(self, s):
class AccountsPage(LoggedPage, MyHTMLPage):
ACCOUNT_TYPES = OrderedDict((
('visa', Account.TYPE_CARD),
('pea', Account.TYPE_PEA),
('valorisation', Account.TYPE_MARKET),
('courant-titre', Account.TYPE_CHECKING),
('courant', Account.TYPE_CHECKING),
('livret', Account.TYPE_SAVINGS),
('ldd', Account.TYPE_SAVINGS),
('pel', Account.TYPE_SAVINGS),
('cel', Account.TYPE_SAVINGS),
('pea', Account.TYPE_PEA),
('titres', Account.TYPE_MARKET),
('valorisation', Account.TYPE_MARKET),
))
def get_tabs(self):
......@@ -155,7 +155,11 @@ def get_list(self):
account.label = u'{0} {1}'.format(unicode(table.xpath('./caption')[0].text.strip()), unicode(box.xpath('.//a')[0].text.strip()))
elif len(foot[0].xpath('.//a')) != 0 and 'onclick' in foot[0].xpath('.//a')[0].attrib:
args = self.js2args(foot[0].xpath('.//a')[0].attrib['onclick'])
account.label = unicode(table.xpath('./caption')[0].text.strip())
account.label = table.xpath('./caption')[0].text.strip()
# Adding 'Valorisation' to the account label in order to differentiate it
# from the card and checking account associate to the './caption'
if 'Valorisation' not in account.label and len(box.xpath('./td[contains(text(), "Valorisation")]')):
account.label = '%s Valorisation Titres' % CleanText('./caption')(table)
else:
continue
......
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