diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/simulation_movement_causality_interaction_workflow/scripts/SimulationMovement_calculateCausalityState.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/simulation_movement_causality_interaction_workflow/scripts/SimulationMovement_calculateCausalityState.xml index b4c9197a9ebc255123c9ad8d4da0395e761a38e9..1d6bb3b85cf39c7200735c289f5bec66ea90608b 100644 --- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/simulation_movement_causality_interaction_workflow/scripts/SimulationMovement_calculateCausalityState.xml +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/simulation_movement_causality_interaction_workflow/scripts/SimulationMovement_calculateCausalityState.xml @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - <tuple/> + <tuple> + <string>Products.PythonScripts.PythonScript</string> + <string>PythonScript</string> + </tuple> + <none/> </tuple> </pickle> <pickle> @@ -71,7 +74,11 @@ delivery_movement = simulation_movement.getDeliveryValue()\n \n if delivery_movement is not None:\n delivery = delivery_movement.getExplanationValue()\n - if delivery.getCausalityState() != \'draft\':\n + # Because Payment Transaction does not have a causality workflow, we cannot assume that\n + # getCausalityState will always be present. This getattr test needs to be removed once\n + # Payment Transaction is linked to a correct causality workflow.\n + if getattr(delivery, \'getCausalityState\', None) is not None \\\n + and delivery.getCausalityState() != \'draft\':\n delivery.activate(\n after_path_and_method_id=(delivery_movement.getPath(),\n (\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).calculate()\n @@ -142,6 +149,7 @@ if delivery_movement is not None:\n <string>delivery_movement</string> <string>None</string> <string>delivery</string> + <string>getattr</string> </tuple> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 84ccffd556a8b77cbaeff0c840b92e32364e3872..5da127eea415025aa9bc10424531ced8f40ae638 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -505 \ No newline at end of file +507 \ No newline at end of file