Commit 88936b55 authored by Alexandre Boeglin's avatar Alexandre Boeglin

use Sale Supply Line and Sale Supply Cell instead of Supply Line and Supply

Cell


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19174 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4f275edf
...@@ -48,8 +48,6 @@ class TestResource(ERP5TypeTestCase): ...@@ -48,8 +48,6 @@ class TestResource(ERP5TypeTestCase):
sale_supply_portal_type = 'Sale Supply' sale_supply_portal_type = 'Sale Supply'
sale_supply_line_portal_type = 'Sale Supply Line' sale_supply_line_portal_type = 'Sale Supply Line'
sale_supply_cell_portal_type = 'Sale Supply Cell' sale_supply_cell_portal_type = 'Sale Supply Cell'
supply_line_portal_type = 'Supply Line'
supply_cell_portal_type = 'Supply Cell'
variation_base_category_list = ['colour', 'size', 'morphology', variation_base_category_list = ['colour', 'size', 'morphology',
'industrial_phase'] 'industrial_phase']
size_list = ['size/Child','size/Man'] size_list = ['size/Child','size/Man']
...@@ -553,7 +551,7 @@ class TestResource(ERP5TypeTestCase): ...@@ -553,7 +551,7 @@ class TestResource(ERP5TypeTestCase):
for pricing_param in value_list: for pricing_param in value_list:
self.logMessage("Creating supply line...", tab=1) self.logMessage("Creating supply line...", tab=1)
supply_line = product.newContent( supply_line = product.newContent(
portal_type=self.supply_line_portal_type) portal_type=self.sale_supply_line_portal_type)
# Set pricing parameter # Set pricing parameter
self.logMessage("Set %s on supply line with value %s..." % \ self.logMessage("Set %s on supply line with value %s..." % \
(key, str(pricing_param)), tab=1) (key, str(pricing_param)), tab=1)
...@@ -585,13 +583,13 @@ class TestResource(ERP5TypeTestCase): ...@@ -585,13 +583,13 @@ class TestResource(ERP5TypeTestCase):
product.setVariationCategoryList(self.industrial_phase_category_list) product.setVariationCategoryList(self.industrial_phase_category_list)
self.logMessage("Creating supply line...", tab=1) self.logMessage("Creating supply line...", tab=1)
supply_line = product.newContent( supply_line = product.newContent(
portal_type=self.supply_line_portal_type) portal_type=self.sale_supply_line_portal_type)
supply_line.setProperty('base_price', 100) supply_line.setProperty('base_price', 100)
supply_line.setSurchargeRatioQuantityStepList([]) supply_line.setSurchargeRatioQuantityStepList([])
supply_line.getCellKeyList(base_id='path_optional_surcharge_ratio') supply_line.getCellKeyList(base_id='path_optional_surcharge_ratio')
cell1 = supply_line.newCell('industrial_phase/phase1', cell1 = supply_line.newCell('industrial_phase/phase1',
base_id='path_optional_surcharge_ratio', base_id='path_optional_surcharge_ratio',
portal_type=self.supply_cell_portal_type) portal_type=self.sale_supply_cell_portal_type)
cell1.setSurchargeRatio(20) cell1.setSurchargeRatio(20)
cell1.setMappedValuePropertyList(["surcharge_ratio"]) cell1.setMappedValuePropertyList(["surcharge_ratio"])
cell1.setMembershipCriterionBaseCategory('industrial_phase') cell1.setMembershipCriterionBaseCategory('industrial_phase')
...@@ -607,7 +605,7 @@ class TestResource(ERP5TypeTestCase): ...@@ -607,7 +605,7 @@ class TestResource(ERP5TypeTestCase):
# Create requested supply line # Create requested supply line
self.logMessage("Creating supply line...", tab=1) self.logMessage("Creating supply line...", tab=1)
supply_line = product.newContent( supply_line = product.newContent(
portal_type=self.supply_line_portal_type) portal_type=self.sale_supply_line_portal_type)
# Set pricing parameter # Set pricing parameter
supply_line.setProperty('base_price', 1) supply_line.setProperty('base_price', 1)
# Define the additional price matrix range # Define the additional price matrix range
...@@ -615,14 +613,14 @@ class TestResource(ERP5TypeTestCase): ...@@ -615,14 +613,14 @@ class TestResource(ERP5TypeTestCase):
supply_line.getCellKeyList(base_id='path_optional_additional_price') supply_line.getCellKeyList(base_id='path_optional_additional_price')
cell1 = supply_line.newCell('industrial_phase/phase1', cell1 = supply_line.newCell('industrial_phase/phase1',
base_id='path_optional_additional_price', base_id='path_optional_additional_price',
portal_type=self.supply_cell_portal_type) portal_type=self.sale_supply_cell_portal_type)
cell1.setAdditionalPrice(2) cell1.setAdditionalPrice(2)
cell1.setMappedValuePropertyList(["additional_price"]) cell1.setMappedValuePropertyList(["additional_price"])
cell1.setMembershipCriterionBaseCategory('industrial_phase') cell1.setMembershipCriterionBaseCategory('industrial_phase')
cell1.setMembershipCriterionCategory('industrial_phase/phase1') cell1.setMembershipCriterionCategory('industrial_phase/phase1')
cell2 = supply_line.newCell('industrial_phase/phase2', cell2 = supply_line.newCell('industrial_phase/phase2',
base_id='path_optional_additional_price', base_id='path_optional_additional_price',
portal_type=self.supply_cell_portal_type) portal_type=self.sale_supply_cell_portal_type)
cell2.setAdditionalPrice(7) cell2.setAdditionalPrice(7)
cell2.setMappedValuePropertyList(["additional_price"]) cell2.setMappedValuePropertyList(["additional_price"])
cell2.setMembershipCriterionBaseCategory('industrial_phase') cell2.setMembershipCriterionBaseCategory('industrial_phase')
......
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