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