[weboob] boobank OFX export coming: identify credit card for each transaction

caramdache at gmail.com caramdache at gmail.com
Sun May 3 16:50:16 CEST 2015


     def format_obj(self, obj, alias):
-        if obj.type != 0:
+        if hasattr(obj, '_coming') and obj._coming == True and hasattr(obj, 'category') and not empty(obj.category):
+            # category contains credit card number for deferred transactions
+            result = u'<STMTTRN><TRNTYPE>%s\n' % obj.category
+        elif obj.type != 0:
             result = u'<STMTTRN><TRNTYPE>%s\n' % self.TYPES_TRANS[obj.type]
         else:
             result = u'<STMTTRN><TRNTYPE>%s\n' % ('DEBIT' if obj.amount < 0 else 'CREDIT')



More information about the weboob mailing list