Add unique id to creditcooperatif (perso)

This commit is contained in:
Florent 2014-09-09 12:28:12 +02:00
commit 6429662e55

View file

@ -103,10 +103,12 @@ class TransactionsJSONPage(BasePage):
ROW_DEBIT = -2
def get_transactions(self):
seen = set()
for tr in self.document['exportData'][1:]:
t = Transaction(0)
t.parse(tr[self.ROW_DATE], tr[self.ROW_TEXT])
t.set_amount(tr[self.ROW_CREDIT], tr[self.ROW_DEBIT])
t.id = t.unique_id(seen)
yield t