[Erp5-report] r27679 - in /erp5/trunk/products/ERP5/tests: testInventory.py testOrder.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jun 19 13:38:30 CEST 2009


Author: seb
Date: Fri Jun 19 13:38:29 2009
New Revision: 27679

URL: http://svn.erp5.org?rev=27679&view=rev
Log:
add currency on sale packing lists. This makes tests 2 tests
working again.

Modified:
    erp5/trunk/products/ERP5/tests/testInventory.py
    erp5/trunk/products/ERP5/tests/testOrder.py

Modified: erp5/trunk/products/ERP5/tests/testInventory.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInventory.py?rev=27679&r1=27678&r2=27679&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInventory.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testInventory.py [utf8] Fri Jun 19 13:38:29 2009
@@ -66,6 +66,7 @@
   inventory_portal_type = "Inventory"
   inventory_line_portal_type = inventory_portal_type + ' Line'
   inventory_cell_portal_type = inventory_portal_type + ' Cell'
+  price_currency =  'currency_module/euro'
   
   def getTitle(self):
     return "Inventory"
@@ -87,6 +88,7 @@
       return 1
     from Products.ERP5Type.Document.PackingList import PackingList
     PackingList.isPacked = isPacked
+    self.createCurrency()
 
   def createCategory(self, parent, id_list):
       last_category = None
@@ -243,7 +245,8 @@
                       destination_section_value = section,
                       destination_value = node,
                       start_date = DateTime() - 2,
-                      stop_date = DateTime() - 2
+                      stop_date = DateTime() - 2,
+                      price_currency = self.price_currency
                      )
     self.assertNotEquals( packing_list.getSourceSectionValue(), None)
     self.assertNotEquals( packing_list.getSourceValue(), None)
@@ -521,6 +524,7 @@
       property_list = [(x[0], organisation_list[x[1]].getRelativeUrl()) for x in property_list] + \
                       [x for x in data.items() if x[0] in ('start_date',)]
       property_dict = {}
+      property_dict['price_currency'] = self.price_currency
       for (id, value) in property_list: property_dict[id] = value
       packing_list.edit(**property_dict)
       for line in data['lines']:
@@ -1872,7 +1876,7 @@
 
     sequence_list.play(self)
 
-  def test_02_InventoryModuleWithVariation(self, quiet=0, run=run_all_test):
+  def test_03_InventoryModuleWithVariation(self, quiet=0, run=run_all_test):
     """
       Test the InventoryModule behavior
     """

Modified: erp5/trunk/products/ERP5/tests/testOrder.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testOrder.py?rev=27679&r1=27678&r2=27679&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testOrder.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testOrder.py [utf8] Fri Jun 19 13:38:29 2009
@@ -75,6 +75,10 @@
     #portal_catalog.manage_catalogClear()
     self.createCategories()
     self.validateRules()
+
+  def createCurrency(self):
+    portal = self.getPortal()
+    portal.currency_module.newContent(id='euro', reference='EUR', title='EURO')
 
   def createCategories(self):
     """




More information about the Erp5-report mailing list