Commit a40c8167 authored by Rafael Monnerat's avatar Rafael Monnerat

stepSetOrderPriceCurrency and stepSetOrderPriceCurrency ware moved to testPackingListMixin.

Added a check for PriceCurrency


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21159 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1cb58947
...@@ -142,29 +142,29 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -142,29 +142,29 @@ class TestInvoiceMixin(TestPackingListMixin,
client2.validate() client2.validate()
sequence.edit(client2=client2) sequence.edit(client2=client2)
def stepCreateCurrency(self, sequence, **kw) : # def stepCreateCurrency(self, sequence, **kw) :
"""Create a default currency. """ # """Create a default currency. """
currency_module = self.getCurrencyModule() # currency_module = self.getCurrencyModule()
if len(currency_module.objectValues(id='EUR'))==0: # if len(currency_module.objectValues(id='EUR'))==0:
currency = self.getCurrencyModule().newContent( # currency = self.getCurrencyModule().newContent(
portal_type='Currency', # portal_type='Currency',
id="EUR", # id="EUR",
base_unit_quantity=0.01, # base_unit_quantity=0.01,
) # )
else: # else:
currency = currency_module.objectValues(id='EUR')[0] # currency = currency_module.objectValues(id='EUR')[0]
sequence.edit(currency=currency) # sequence.edit(currency=currency)
#
def stepSetOrderPriceCurrency(self, sequence, **kw) : # def stepSetOrderPriceCurrency(self, sequence, **kw) :
"""Set the price currency of the order. # """Set the price currency of the order.
#
This step is not necessary. # This step is not necessary.
TODO : - include a test without this step. # TODO : - include a test without this step.
- include a test with this step late. # - include a test with this step late.
""" # """
currency = sequence.get('currency') # currency = sequence.get('currency')
order = sequence.get('order') # order = sequence.get('order')
order.setPriceCurrency(currency.getRelativeUrl()) # order.setPriceCurrency(currency.getRelativeUrl())
def stepCreateSaleInvoiceTransactionRule(self, sequence, **kw) : def stepCreateSaleInvoiceTransactionRule(self, sequence, **kw) :
"""Create the rule for accounting. """ """Create the rule for accounting. """
...@@ -550,6 +550,8 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -550,6 +550,8 @@ class TestInvoiceMixin(TestPackingListMixin,
invoice.getDestinationAdministration()) invoice.getDestinationAdministration())
self.assertEquals(packing_list.getSourceAdministration(), \ self.assertEquals(packing_list.getSourceAdministration(), \
invoice.getSourceAdministration()) invoice.getSourceAdministration())
self.assertEquals(packing_list.getPriceCurrency(), \
invoice.getPriceCurrency())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment