diff --git a/weboob/backends/bnporc/pages/account_coming.py b/weboob/backends/bnporc/pages/account_coming.py index 97b0ae7f..ba53805b 100644 --- a/weboob/backends/bnporc/pages/account_coming.py +++ b/weboob/backends/bnporc/pages/account_coming.py @@ -36,6 +36,7 @@ class AccountComing(BasePage): date = tds[0].getchildren()[0].attrib.get('name', '') label = u'' label += tds[1].text + label = label.replace(u'\xa0', u'') for child in tds[1].getchildren(): if child.text: label += child.text if child.tail: label += child.tail @@ -43,7 +44,7 @@ class AccountComing(BasePage): label = label.strip() amount = tds[2].text.replace('.', '').replace(',', '.') - operation = Operation() + operation = Operation(len(self.operations)) operation.date = date operation.label = label operation.amount = float(amount) diff --git a/weboob/backends/bnporc/pages/account_history.py b/weboob/backends/bnporc/pages/account_history.py index fce6a30d..a5df0c98 100644 --- a/weboob/backends/bnporc/pages/account_history.py +++ b/weboob/backends/bnporc/pages/account_history.py @@ -45,7 +45,7 @@ class AccountHistory(BasePage): label = label.strip() amount = tds[2].text.replace('.', '').replace(',', '.') # if we don't have exactly one '.', this is not a floatm try the next - operation = Operation() + operation = Operation(len(self.operations)) if amount.count('.') != 1: amount = tds[3].text.replace('.', '').replace(',', '.') operation.amount = float(amount) diff --git a/weboob/backends/cragr/backend.py b/weboob/backends/cragr/backend.py index 9b2e273b..2c092852 100644 --- a/weboob/backends/cragr/backend.py +++ b/weboob/backends/cragr/backend.py @@ -55,5 +55,9 @@ class CragrBackend(BaseBackend, ICapBank): raise AccountNotFound() def iter_operations(self, account): - """ Not supported yet """ + """ TODO Not supported yet """ + return iter([]) + + def iter_history(self, account): + """ TODO Not supported yet """ return iter([]) diff --git a/weboob/capabilities/bank.py b/weboob/capabilities/bank.py index ef725c4d..23361956 100644 --- a/weboob/capabilities/bank.py +++ b/weboob/capabilities/bank.py @@ -62,8 +62,8 @@ class Account(CapBaseObject): class Operation(CapBaseObject): FIELDS = ('date', 'label', 'amount') - def __init__(self): - CapBaseObject(self, 0) + def __init__(self, id): + CapBaseObject.__init__(self, id) self.date = None self._label = u'' self._amount = 0.0