Commit 1d792c4d authored by Łukasz Nowak's avatar Łukasz Nowak

- defined resources' variation portal type, used it on variated resource creation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22332 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 120002d1
...@@ -53,6 +53,8 @@ class TestProductionOrderMixin(TestOrderMixin): ...@@ -53,6 +53,8 @@ class TestProductionOrderMixin(TestOrderMixin):
operation_line_portal_type = 'Transformation Operation' operation_line_portal_type = 'Transformation Operation'
operation_category_list = ['operation1', 'operation2'] operation_category_list = ['operation1', 'operation2']
colour_variation_portal_type = 'Product Individual Variation'
morphology_variation_portal_type = 'Product Individual Variation'
colour_list = ['green','blue'] colour_list = ['green','blue']
mrp_size_list = ['Man','Woman'] mrp_size_list = ['Man','Woman']
...@@ -154,10 +156,10 @@ class TestProductionOrderMixin(TestOrderMixin): ...@@ -154,10 +156,10 @@ class TestProductionOrderMixin(TestOrderMixin):
) )
# resource.setSizeList(self.size_list) # resource.setSizeList(self.size_list)
# Add colour variation # Add colour variation
colour_variation_count = 3 colour_variation_count = 3
for i in range(colour_variation_count): for i in range(colour_variation_count):
variation_portal_type = 'Product Individual Variation' variation = resource.newContent(portal_type = self.colour_variation_portal_type)
variation = resource.newContent(portal_type = variation_portal_type)
variation.edit( variation.edit(
title = 'ColourVariation%s' % str(i), title = 'ColourVariation%s' % str(i),
variation_base_category_list = ('variation',) variation_base_category_list = ('variation',)
...@@ -165,8 +167,7 @@ class TestProductionOrderMixin(TestOrderMixin): ...@@ -165,8 +167,7 @@ class TestProductionOrderMixin(TestOrderMixin):
# Add morphology variation # Add morphology variation
morphology_variation_count = 2 morphology_variation_count = 2
for i in range(morphology_variation_count) : for i in range(morphology_variation_count) :
variation_portal_type = 'Product Individual Variation' variation = resource.newContent(portal_type=self.morphology_variation_portal_type)
variation = resource.newContent(portal_type=variation_portal_type)
variation.edit( variation.edit(
title = 'MorphologyVariation%s' % str(i), title = 'MorphologyVariation%s' % str(i),
variation_base_category_list = ('variation',) variation_base_category_list = ('variation',)
......
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