From a0856cb74ce615a9be4d1ec4bef9bc5ade2346a0 Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 13 Aug 2013 11:33:14 +0200 Subject: [PATCH] Better balance informations --- modules/leclercmobile/backend.py | 3 +++ modules/nettokom/backend.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/leclercmobile/backend.py b/modules/leclercmobile/backend.py index 4421a065..ef420719 100644 --- a/modules/leclercmobile/backend.py +++ b/modules/leclercmobile/backend.py @@ -22,6 +22,7 @@ from weboob.capabilities.bill import ICapBill, SubscriptionNotFound,\ BillNotFound, Subscription, Bill from weboob.tools.backend import BaseBackend, BackendConfig +from weboob.capabilities.base import Currency from weboob.tools.value import ValueBackendPassword from .browser import Leclercmobile @@ -103,5 +104,7 @@ class LeclercMobileBackend(BaseBackend, ICapBill): subscription = self.get_subscription(subscription) with self.browser: balance = self.browser.get_balance() + balance.label = u"Balance %s" % subscription.id balance.id = "%s-balance" % subscription.id + balance.currency = Currency.CUR_EUR return balance diff --git a/modules/nettokom/backend.py b/modules/nettokom/backend.py index 834315b6..4830d150 100644 --- a/modules/nettokom/backend.py +++ b/modules/nettokom/backend.py @@ -77,7 +77,8 @@ class NettoKomBackend(BaseBackend, ICapBill): if not isinstance(subscription, Subscription): subscription = self.get_subscription(subscription) balance = Detail() + balance.id = "%s-balance" % subscription.id balance.price = subscription._balance - balance.label = u"Balance" + balance.label = u"Balance %s" % subscription.id balance.currency = Currency.CUR_EUR return balance