diff --git a/product/ERP5/MovementGroup.py b/product/ERP5/MovementGroup.py index 29cb770bd8c2e5557c9aca3df53dacc024710143..b6c09a022ffec357590da2b101a7834217792d02 100644 --- a/product/ERP5/MovementGroup.py +++ b/product/ERP5/MovementGroup.py @@ -259,8 +259,11 @@ class OrderMovementGroup(RootMovementGroup): allow_class(OrderMovementGroup) -class DefineMovementCausalityMovementGroup(RootMovementGroup): - """ TODO: docstring """ +class CausalityAssignmentMovementGroup(RootMovementGroup): + """ + This movement group is used in order to define the causality + on lines and cells. + """ def addCausalityToEdit(self, movement): order_movement = movement.getOrderValue() @@ -269,7 +272,7 @@ class DefineMovementCausalityMovementGroup(RootMovementGroup): order_movement_url = order_movement.getRelativeUrl() if order_movement_url not in causality: causality.append(order_movement_url) - self.setGroupEdit(causality=causality) + self.setGroupEdit(causality_list=causality) def __init__(self, movement, **kw): RootMovementGroup.__init__(self, movement=movement, **kw) @@ -279,7 +282,7 @@ class DefineMovementCausalityMovementGroup(RootMovementGroup): self.addCausalityToEdit(movement) return 1 -allow_class(DefineMovementCausalityMovementGroup) +allow_class(CausalityAssignmentMovementGroup) class CausalityMovementGroup(RootMovementGroup): """ TODO: docstring """ diff --git a/product/ERP5/tests/testPackingList.py b/product/ERP5/tests/testPackingList.py index 121d91ac758340b05188f8a842866b64d8d5c0ac..1b3dcefc70572e962216fbae9d3633b3b918da1a 100644 --- a/product/ERP5/tests/testPackingList.py +++ b/product/ERP5/tests/testPackingList.py @@ -392,6 +392,8 @@ class TestPackingListMixin(TestOrderMixin): packing_list_line = sequence.get('packing_list_line') for simulation_line in simulation_line_list: self.assertEquals(simulation_line.getDeliveryValue(),packing_list_line) + self.assertEquals(packing_list_line.getCausalityValue(), + simulation_line.getOrderValue()) def stepCheckSimulationDisconnected(self,sequence=None, sequence_list=None, **kw): """