From 2357b698a5f4640567ee143c903e38e1e0199dd5 Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Mon, 21 Jan 2008 15:07:04 +0000 Subject: [PATCH] * for safety, do not skip calculate even if simulation state is 'draft'. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18804 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../scripts/Delivery_calculateCausalityState.xml | 4 +--- .../scripts/DeliveryMovement_calculateCausalityState.xml | 4 +--- .../scripts/SimulationMovement_calculateCausalityState.xml | 5 +---- product/ERP5/bootstrap/erp5_core/bt/revision | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_causality_interaction_workflow/scripts/Delivery_calculateCausalityState.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_causality_interaction_workflow/scripts/Delivery_calculateCausalityState.xml index 3e5758d35c..01604dab28 100644 --- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_causality_interaction_workflow/scripts/Delivery_calculateCausalityState.xml +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_causality_interaction_workflow/scripts/Delivery_calculateCausalityState.xml @@ -68,10 +68,8 @@ <value> <string>delivery = state_change[\'object\']\n \n getCausalityState = getattr(delivery, \'getCausalityState\', None)\n -getSimulationState = getattr(delivery, \'getSimulationState\', None)\n \n -if getCausalityState is not None and getCausalityState() != \'draft\' and \\\n - getSimulationState is not None and getSimulationState() != \'draft\':\n +if getCausalityState is not None and getCausalityState() != \'draft\':\n delivery.calculate()\n </string> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_movement_causality_interaction_workflow/scripts/DeliveryMovement_calculateCausalityState.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_movement_causality_interaction_workflow/scripts/DeliveryMovement_calculateCausalityState.xml index 89ef662356..f41eb8cfc6 100644 --- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_movement_causality_interaction_workflow/scripts/DeliveryMovement_calculateCausalityState.xml +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_movement_causality_interaction_workflow/scripts/DeliveryMovement_calculateCausalityState.xml @@ -79,10 +79,8 @@ delivery = delivery_movement.getExplanationValue()\n # in the Accounting Transaction Module\n \n getCausalityState = getattr(delivery, \'getCausalityState\', None)\n -getSimulationState = getattr(delivery, \'getSimulationState\', None)\n \n -if getCausalityState is not None and getCausalityState() != \'draft\' and \\\n - getSimulationState is not None and getSimulationState() != \'draft\':\n +if getCausalityState is not None and getCausalityState() != \'draft\':\n delivery.calculate()\n </string> </value> </item> 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 43b077d096..addbdc0a78 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 @@ -75,10 +75,8 @@ if delivery_movement is not None:\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 getCausalityState = getattr(delivery, \'getCausalityState\', None)\n - getSimulationState = getattr(delivery, \'getSimulationState\', None)\n \n - if getCausalityState is not None and getCausalityState() != \'draft\' and \\\n - getSimulationState is not None and getSimulationState() != \'draft\':\n + if getCausalityState is not None and getCausalityState() != \'draft\':\n delivery.activate(\n after_path_and_method_id=(delivery_movement.getPath(),\n (\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).calculate()\n @@ -151,7 +149,6 @@ if delivery_movement is not None:\n <string>delivery</string> <string>getattr</string> <string>getCausalityState</string> - <string>getSimulationState</string> </tuple> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index f4283ff317..dd9de55003 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -676 \ No newline at end of file +677 \ No newline at end of file -- 2.30.9