Ignore:
Timestamp:
30 Dec 2014, 12:52:40 (10 years ago)
Author:
Henrik Bettermann
Message:

Move ProductOption? interfaces to productoptions to avoid nasty circular imports.

Use ISO_4217_CURRENCIES.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/customers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r12342 r12343  
    12931293        # from the chosen product.
    12941294        self.assertTrue('<option selected="selected" value="Any product option">'
    1295                         'Any product option @ 88.8 EUR</option>'
     1295                        'Any product option @ 88.8 Euro</option>'
    12961296                        in self.browser.contents)
    12971297        self.assertTrue('<option value="First option">First option '
    1298                         '@ 99.9 USD</option>' in self.browser.contents)
     1298                        '@ 99.9 US Dollar</option>' in self.browser.contents)
    12991299        # In test browser we can at least replace the option
    13001300        self.browser.getControl(
     
    13041304        self.assertEqual(contract.product_options[0].title, 'First option')
    13051305        self.browser.getLink("View").click()
    1306         self.assertTrue('<span>First option @ 99.9 USD</span>' in self.browser.contents)
     1306        self.assertTrue('<span>First option @ 99.9 US Dollar</span>' in self.browser.contents)
    13071307        self.assertEqual(self.browser.url, self.contracts_path + '/%s/index' % conid)
    13081308        # An href attribute is referring to the document and product objects
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/vocabularies.py

    r12340 r12343  
    3333from waeup.ikoba.utils.helpers import get_sorted_preferred
    3434from waeup.ikoba.utils.countries import COUNTRIES
     35from waeup.ikoba.payments.currencies import ISO_4217_CURRENCIES
    3536
    3637#: a tuple of tuples (<COUNTRY-NAME>, <ISO-CODE>) with Nigeria first.
     
    203204
    204205    def getTitle(self, context, value):
    205         return "%s @ %s %s" % (value.title, value.fee, value.currency)
     206        currency = ISO_4217_CURRENCIES[value.currency][1]
     207        return "%s @ %s %s" % (value.title, value.fee, currency)
Note: See TracChangeset for help on using the changeset viewer.