change currencies integer constants to ISO code strings
This commit is contained in:
parent
407774937d
commit
6099560b8c
11 changed files with 24 additions and 39 deletions
|
|
@ -61,7 +61,7 @@ class CitelisBrowser(BaseBrowser):
|
|||
self.location('%s://%s/summarySearch.do?reqCode=search' % (self.PROTOCOL, self.DOMAIN))
|
||||
account = Account()
|
||||
account.id = u'1'
|
||||
account.currency = Account.CUR_EUR
|
||||
account.currency = 'EUR'
|
||||
account.balance = self.page.get_balance()
|
||||
account.label = u'Synthèse financière'
|
||||
return [account]
|
||||
|
|
|
|||
|
|
@ -65,8 +65,7 @@ class DashboardPage(BasePage):
|
|||
account.balance = Decimal(FrenchTransaction.clean_amount(
|
||||
get_field('accountTotal')))
|
||||
account.label = get_field('accountLabel2')
|
||||
account.currency = Account.TXT2CUR.get(get_field('accountDev'),
|
||||
Account.CUR_UNKNOWN)
|
||||
account.currency = account.get_currency(get_field('accountDev'))
|
||||
|
||||
return account
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ from datetime import date, timedelta
|
|||
import re
|
||||
import hashlib
|
||||
|
||||
from weboob.capabilities.base import Currency
|
||||
from weboob.capabilities.bank import Account, Transaction
|
||||
from weboob.capabilities.base import NotAvailable
|
||||
from weboob.tools.browser import BasePage
|
||||
|
|
@ -59,7 +58,7 @@ class AccountsList(BasePage):
|
|||
# TODO: no idea abount how proxy account are displayed
|
||||
for a in self.document.xpath('//a[@class="mainclic"]'):
|
||||
account = Account()
|
||||
account.currency = Currency.CUR_EUR
|
||||
account.currency = 'EUR'
|
||||
account.id = unicode(a.find('span[@class="account-number"]').text)
|
||||
account._id = account.id
|
||||
account.label = unicode(a.find('span[@class="title"]').text)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
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
|
||||
|
|
@ -106,5 +105,5 @@ class LeclercMobileBackend(BaseBackend, ICapBill):
|
|||
balance = self.browser.get_balance()
|
||||
balance.label = u"Balance %s" % subscription.id
|
||||
balance.id = "%s-balance" % subscription.id
|
||||
balance.currency = Currency.CUR_EUR
|
||||
balance.currency = 'EUR'
|
||||
return balance
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
|
||||
from weboob.capabilities.bill import ICapBill, Subscription, SubscriptionNotFound, Detail
|
||||
from weboob.capabilities.base import Currency
|
||||
from weboob.tools.backend import BaseBackend, BackendConfig
|
||||
from weboob.tools.value import ValueBackendPassword
|
||||
|
||||
|
|
@ -80,5 +79,5 @@ class NettoKomBackend(BaseBackend, ICapBill):
|
|||
balance.id = "%s-balance" % subscription.id
|
||||
balance.price = subscription._balance
|
||||
balance.label = u"Balance %s" % subscription.id
|
||||
balance.currency = Currency.CUR_EUR
|
||||
balance.currency = 'EUR'
|
||||
return balance
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
|
||||
from weboob.capabilities.bill import ICapBill, Subscription, SubscriptionNotFound, Detail
|
||||
from weboob.capabilities.base import Currency
|
||||
from weboob.tools.backend import BaseBackend, BackendConfig
|
||||
from weboob.tools.value import ValueBackendPassword
|
||||
|
||||
|
|
@ -76,5 +75,5 @@ class PoivyBackend(BaseBackend, ICapBill):
|
|||
balance.id = "%s-balance" % subscription.id
|
||||
balance.price = subscription._balance
|
||||
balance.label = u"Balance %s" % subscription.id
|
||||
balance.currency = Currency.CUR_EUR
|
||||
balance.currency = 'EUR'
|
||||
return balance
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from weboob.tools.browser import BasePage
|
||||
from weboob.capabilities.base import Currency
|
||||
from weboob.capabilities.bill import Subscription, Detail
|
||||
from decimal import Decimal, InvalidOperation
|
||||
from datetime import datetime, date, time
|
||||
|
|
@ -106,7 +105,7 @@ class HistoryPage(BasePage):
|
|||
detail.price = Decimal(price)
|
||||
except InvalidOperation:
|
||||
detail.price = Decimal(0) # free calls
|
||||
detail.currency = Currency.CUR_EUR
|
||||
detail.currency = 'EUR'
|
||||
|
||||
yield detail
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue