diff --git a/modules/societegenerale/browser.py b/modules/societegenerale/browser.py index a906def3b8b0f7d5d61f0dde7a60c8c8f3e9fddc..abbe51efb274e23a0ace81044f97d189dfc7ffa4 100644 --- a/modules/societegenerale/browser.py +++ b/modules/societegenerale/browser.py @@ -25,7 +25,7 @@ from weboob.browser import LoginBrowser, URL, need_login, StatesMixin from weboob.exceptions import BrowserIncorrectPassword, ActionNeeded, BrowserUnavailable -from weboob.capabilities.bank import Account, TransferBankError, AddRecipientStep, TransactionType +from weboob.capabilities.bank import Account, TransferBankError, AddRecipientStep, TransactionType, AccountOwnerType from weboob.capabilities.base import find_object, NotAvailable from weboob.browser.exceptions import BrowserHTTPNotFound, ClientError from weboob.capabilities.profile import ProfileMissing @@ -164,6 +164,7 @@ def iter_cards(self, account): card.currency = account.currency card._internal_id = el['idTechnique'] card._prestation_id = el['id'] + card.owner_type = AccountOwnerType.PRIVATE yield card @need_login @@ -202,8 +203,11 @@ def get_accounts_list(self): for card in self.iter_cards(account): card.parent = account card.ownership = account.ownership + card.owner_type = AccountOwnerType.PRIVATE yield card + account.owner_type = AccountOwnerType.PRIVATE + if account._prestation_id in account_ibans: account.iban = account_ibans[account._prestation_id] diff --git a/modules/societegenerale/sgpe/browser.py b/modules/societegenerale/sgpe/browser.py index 9ab2a40b954fd3f13d5d5fc22b373e72c9ce1c0e..ab1fec866d96adf55198124bc0e3a82ca8b70969 100644 --- a/modules/societegenerale/sgpe/browser.py +++ b/modules/societegenerale/sgpe/browser.py @@ -29,7 +29,7 @@ from weboob.capabilities.base import find_object from weboob.capabilities.bank import ( AccountNotFound, RecipientNotFound, AddRecipientStep, AddRecipientBankError, - Recipient, TransferBankError, + Recipient, TransferBankError, AccountOwnerType, ) from weboob.tools.value import Value @@ -174,6 +174,7 @@ def get_accounts_list(self): self.intraday_balances.go() for acc in self.page.populate_balances(accounts): + acc.owner_type = AccountOwnerType.ORGANIZATION yield acc @need_login