Commit 1778a8f6 authored by Nicolas Dumazet's avatar Nicolas Dumazet

fix test(Legacy)?ProductionOrder.test_09_testTransformationWithVariation

I was wrong in r33483: even if we delegate ID generation to XMLMatrix.newCell,
we still need to pass along predicate parameters, and mapped_value_property_list


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33741 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7f240496
......@@ -312,11 +312,16 @@ class TestProductionOrderMixin(TestOrderMixin):
transformation_transformed_resource = sequence.get('transformation_transformed_resource')
for colour in self.colour_list:
colour_path = 'colour/%s' % colour
for size in self.mrp_size_list:
size_path = 'size/%s' % size
transformation_transformed_resource.newCell(
'colour/%s' % colour,
'size/%s' % size,
colour_path,
size_path,
mapped_value_property_list = ('quantity',),
quantity = self.colour_size_quantity_dict[colour][size],
membership_criterion_base_category= ('size', 'colour', ),
membership_criterion_category= (size_path, colour_path,),
base_id="quantity",
)
......@@ -329,11 +334,15 @@ class TestProductionOrderMixin(TestOrderMixin):
transformation_transformed_resource = sequence.get('transformation_transformed_resource')
for colour in self.colour_list:
colour_path = 'colour/%s' % colour
for size in self.mrp_size_list:
size_path = 'size/%s' % size
transformation_transformed_resource.newCell(
'colour/%s' % colour,
'size/%s' % size,
colour_path,
size_path,
categories = self.colour_size_variation_dict[colour][size],
membership_criterion_base_category= ('size', 'colour', ),
membership_criterion_category= (size_path, colour_path,),
base_id="variation",
)
......@@ -345,11 +354,17 @@ class TestProductionOrderMixin(TestOrderMixin):
order_line = sequence.get('order_line')
for colour in self.colour_list:
colour_path = 'colour/%s' % colour
for size in self.mrp_size_list:
size_path = 'size/%s' % size
order_line.newCell(
'size/%s' % size,
'colour/%s' % colour,
size_path,
colour_path,
mapped_value_property_list = ('quantity',),
quantity = self.order_line_colour_size_quantity_dict[colour][size],
categories = [size_path, colour_path],
membership_criterion_base_category= ('size', 'colour', ),
membership_criterion_category= (size_path, colour_path,),
base_id='movement',
)
......
......@@ -313,12 +313,19 @@ class TestProductionOrderMixin(TestOrderMixin):
transformation_transformed_resource = sequence.get('transformation_transformed_resource')
for colour in self.colour_list:
colour_path = 'colour/%s' % colour
for size in self.mrp_size_list:
size_path = 'size/%s' % size
quantity = self.colour_size_quantity_dict[colour][size]
transformation_transformed_resource.newCell('colour/%s' % colour,
'size/%s' % size,
transformation_transformed_resource.newCell(
colour_path,
size_path,
mapped_value_property_list = ('quantity',),
quantity=quantity,
base_id="quantity")
membership_criterion_base_category= ('size', 'colour', ),
membership_criterion_category= (size_path, colour_path,),
base_id="quantity",
)
def stepSetTransformationTransformedResourceVariationMatrix(self, sequence=None, sequence_list=None,
**kw):
......@@ -329,12 +336,18 @@ class TestProductionOrderMixin(TestOrderMixin):
transformation_transformed_resource = sequence.get('transformation_transformed_resource')
for colour in self.colour_list:
colour_path = 'colour/%s' % colour
for size in self.mrp_size_list:
size_path = 'size/%s' % size
variation_list = self.colour_size_variation_dict[colour][size]
transformation_transformed_resource.newCell('colour/%s' % colour,
'size/%s' % size,
transformation_transformed_resource.newCell(
colour_path,
size_path,
categories = variation_list,
base_id="variation")
membership_criterion_base_category= ('size', 'colour', ),
membership_criterion_category= (size_path, colour_path,),
base_id="variation",
)
def stepSetOrderLineQuantityMatrix(self, sequence=None, sequence_list=None,
**kw):
......@@ -343,11 +356,17 @@ class TestProductionOrderMixin(TestOrderMixin):
"""
order_line = sequence.get('order_line')
for colour in self.colour_list:
colour_path = 'colour/%s' % colour
for size in self.mrp_size_list:
size_path = 'size/%s' % size
order_line.newCell(
'size/%s' % size,
'colour/%s' % colour,
size_path,
colour_path,
mapped_value_property_list = ('quantity',),
quantity = self.order_line_colour_size_quantity_dict[colour][size],
categories = [size_path, colour_path],
membership_criterion_base_category= ('size', 'colour', ),
membership_criterion_category= (size_path, colour_path,),
base_id='movement',
)
......
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