diff --git a/product/ERP5/tests/testInvoice.py b/product/ERP5/tests/testInvoice.py index 1dece77878509373a3b66ad947349bc82dfec315..9c133dc199c136396cc01f183be62af438bbcf89 100644 --- a/product/ERP5/tests/testInvoice.py +++ b/product/ERP5/tests/testInvoice.py @@ -142,29 +142,29 @@ class TestInvoiceMixin(TestPackingListMixin, client2.validate() sequence.edit(client2=client2) - def stepCreateCurrency(self, sequence, **kw) : - """Create a default currency. """ - currency_module = self.getCurrencyModule() - if len(currency_module.objectValues(id='EUR'))==0: - currency = self.getCurrencyModule().newContent( - portal_type='Currency', - id="EUR", - base_unit_quantity=0.01, - ) - else: - currency = currency_module.objectValues(id='EUR')[0] - sequence.edit(currency=currency) - - def stepSetOrderPriceCurrency(self, sequence, **kw) : - """Set the price currency of the order. - - This step is not necessary. - TODO : - include a test without this step. - - include a test with this step late. - """ - currency = sequence.get('currency') - order = sequence.get('order') - order.setPriceCurrency(currency.getRelativeUrl()) +# def stepCreateCurrency(self, sequence, **kw) : +# """Create a default currency. """ +# currency_module = self.getCurrencyModule() +# if len(currency_module.objectValues(id='EUR'))==0: +# currency = self.getCurrencyModule().newContent( +# portal_type='Currency', +# id="EUR", +# base_unit_quantity=0.01, +# ) +# else: +# currency = currency_module.objectValues(id='EUR')[0] +# sequence.edit(currency=currency) +# +# def stepSetOrderPriceCurrency(self, sequence, **kw) : +# """Set the price currency of the order. +# +# This step is not necessary. +# TODO : - include a test without this step. +# - include a test with this step late. +# """ +# currency = sequence.get('currency') +# order = sequence.get('order') +# order.setPriceCurrency(currency.getRelativeUrl()) def stepCreateSaleInvoiceTransactionRule(self, sequence, **kw) : """Create the rule for accounting. """ @@ -550,6 +550,8 @@ class TestInvoiceMixin(TestPackingListMixin, invoice.getDestinationAdministration()) self.assertEquals(packing_list.getSourceAdministration(), \ invoice.getSourceAdministration()) + self.assertEquals(packing_list.getPriceCurrency(), \ + invoice.getPriceCurrency())