Commit f0f4add4 authored by Sebastien Robin's avatar Sebastien Robin

add currency on sale packing lists. This makes tests 2 tests

working again.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27679 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0fa1d0b8
......@@ -66,6 +66,7 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
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 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
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 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
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 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
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 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
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
"""
......
......@@ -76,6 +76,10 @@ class TestOrderMixin:
self.createCategories()
self.validateRules()
def createCurrency(self):
portal = self.getPortal()
portal.currency_module.newContent(id='euro', reference='EUR', title='EURO')
def createCategories(self):
"""
Light install create only base categories, so we create
......
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