Commit 34b2c2f3 authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Romain Bignon

[bp] Get Savings IBAN

The link of the rib of savings accounts are only available on the
history page.

Closes: 31920@sibi
parent c5a79d02
......@@ -102,6 +102,14 @@ class item_account_generic(ItemElement):
if rib_link:
response = self.page.browser.open(rib_link)
return response.page.get_iban()
elif Field('type')(self) == Account.TYPE_SAVINGS:
# The rib link is available on the history page (ex: Livret A)
his_page = self.page.browser.open(Field('url')(self))
rib_link = Link('//a[abbr[contains(text(), "RIB")]]', default=NotAvailable)(his_page.page.doc)
if rib_link:
response = self.page.browser.open(rib_link)
return response.page.get_iban()
return NotAvailable
def obj_type(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